Skip to content

Commit ca072ae

Browse files
committed
Finalised data type set for SMARTLoader.
Finalised and tested SMARTLoader data types. Need to do now the final collection transfer and validations. Will extract SMARTLoader from this library and create a new Git entry.
1 parent aea6589 commit ca072ae

File tree

8 files changed

+6537
-2777
lines changed

8 files changed

+6537
-2777
lines changed

.idea/workspace.xml

+61-102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

old/SMARTLoader.old.php

+5,197
Large diffs are not rendered by default.

src/PHPLib/SMARTLoader.php

+1,185-2,674
Large diffs are not rendered by default.

test/SMART/CHILD.xlsx

75.6 KB
Binary file not shown.

test/SMART/Cleaned.zip

258 Bytes
Binary file not shown.

test/SMART/HOUSEHOLD.xlsx

-7 Bytes
Binary file not shown.

test/SMART/MOTHER.xlsx

18.5 KB
Binary file not shown.

test/SMARTLoader.php

+94-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
//
2929
echo( '$test = new SMARTLoader();' . "\n" );
3030
$test = new SMARTLoader();
31-
print_r( $test );
3231

3332
echo( "\n====================================================================================\n\n" );
3433

@@ -272,6 +271,100 @@
272271
echo( '$result = $test->ChildDatasetMotherOffset( "MOTHER" );' . "\n" );
273272
$result = $test->ChildDatasetMotherOffset( "MOTHER" );
274273
var_dump( $result );
274+
275+
echo( "\n====================================================================================\n\n" );
276+
277+
//
278+
// Load child dataset.
279+
//
280+
echo( '$result = $test->LoadChildDataset();' . "\n" );
281+
$result = $test->LoadChildDataset();
282+
var_dump( $result );
283+
284+
echo( "\n" );
285+
286+
//
287+
// Get child header.
288+
//
289+
echo( '$result = $test->LoadChildDatasetHeader();' . "\n" );
290+
$result = $test->LoadChildDatasetHeader();
291+
var_dump( $result );
292+
if( $result & SMARTLoader::kSTATUS_DUPLICATE_COLUMNS )
293+
print_r( $test->ChildDatasetDuplicateHeaderCoumns() );
294+
print_r( $test->ChildDatasetHeaderCoumns() );
295+
296+
echo( "\n" );
297+
298+
//
299+
// Get child fields.
300+
//
301+
echo( '$result = $test->LoadChildDatasetFields();' . "\n" );
302+
$result = $test->LoadChildDatasetFields();
303+
var_dump( $result );
304+
print_r( $test->ChildDatasetFields() );
305+
306+
echo( "\n====================================================================================\n\n" );
307+
308+
//
309+
// Load mother dataset.
310+
//
311+
echo( '$result = $test->LoadMotherDataset();' . "\n" );
312+
$result = $test->LoadMotherDataset();
313+
var_dump( $result );
314+
315+
echo( "\n" );
316+
317+
//
318+
// Get mother header.
319+
//
320+
echo( '$result = $test->LoadMotherDatasetHeader();' . "\n" );
321+
$result = $test->LoadMotherDatasetHeader();
322+
var_dump( $result );
323+
if( $result & SMARTLoader::kSTATUS_DUPLICATE_COLUMNS )
324+
print_r( $test->motherDatasetDuplicateHeaderCoumns() );
325+
print_r( $test->motherDatasetHeaderCoumns() );
326+
327+
echo( "\n" );
328+
329+
//
330+
// Get mother fields.
331+
//
332+
echo( '$result = $test->LoadMotherDatasetFields();' . "\n" );
333+
$result = $test->LoadMotherDatasetFields();
334+
var_dump( $result );
335+
print_r( $test->motherDatasetFields() );
336+
337+
echo( "\n====================================================================================\n\n" );
338+
339+
//
340+
// Load household dataset.
341+
//
342+
echo( '$result = $test->LoadHouseholdDataset();' . "\n" );
343+
$result = $test->LoadHouseholdDataset();
344+
var_dump( $result );
345+
346+
echo( "\n" );
347+
348+
//
349+
// Get household header.
350+
//
351+
echo( '$result = $test->LoadHouseholdDatasetHeader();' . "\n" );
352+
$result = $test->LoadHouseholdDatasetHeader();
353+
var_dump( $result );
354+
if( $result & SMARTLoader::kSTATUS_DUPLICATE_COLUMNS )
355+
print_r( $test->HouseholdDatasetDuplicateHeaderCoumns() );
356+
print_r( $test->HouseholdDatasetHeaderCoumns() );
357+
358+
echo( "\n" );
359+
360+
//
361+
// Get household fields.
362+
//
363+
echo( '$result = $test->LoadHouseholdDatasetFields();' . "\n" );
364+
$result = $test->LoadHouseholdDatasetFields();
365+
var_dump( $result );
366+
print_r( $test->HouseholdDatasetFields() );
367+
275368
exit;
276369

277370
echo( "\n====================================================================================\n\n" );

0 commit comments

Comments
 (0)