|
Odyssey
|
Public Member Functions | |
| __construct ($cu='') | |
| CreateDetailTemplateMap ($loan_id, $map) | |
| masterSchemaMap ($row) | |
| mapRandomQuestionResponses ($user_id, $test_credentials) | |
| MapUserData ($row, $test_credentials) | |
| MapUserLoan ($user_id, $loan_id, $row, $data) | |
Protected Member Functions | |
| AddToArray ($arr) | |
| CreateJsonApp ($row, $data) | |
| MapCsvToJsonArray ($row, $json_map) | |
| CreateJsonMap ($row=[], $tpl=[]) | |
| FindFieldId ($field, $tpl) | |
| DecodeFieldAttr ($field_arr=[]) | |
| FindFieldIdentifier ($field, $field_attr) | |
Protected Attributes | |
| $cu = 'SCRUBSCU' | |
Maps and array of CSV test data to the DB field data. There is no direct 1:1 mapping we can build easily. We have to go into the JSON in lnnappschemadetail->fieldattr and look for a match on "responsetablefield" or "fieldcorename" to correctly map CSV fields to DB fields.
Injects into LoanDataGenerator class and probably has no other useful application, but does allow LoanDataGenerator to utilize a different mapper if it applies.
Definition at line 14 of file LoanGeneratorMapper.php.
| LoanGeneratorMapper::__construct | ( | $cu = '' | ) |
LoanGeneratorMapper constructor.
| string | $cu |
Definition at line 24 of file LoanGeneratorMapper.php.
|
protected |
Helper for above.
| array | $arr |
Definition at line 107 of file LoanGeneratorMapper.php.
| LoanGeneratorMapper::CreateDetailTemplateMap | ( | $loan_id, | |
| $map | |||
| ) |
Using the master template, create the template for this loan.
| int | $loan_id | |
| array | $map | (of detail schema template) |
Definition at line 37 of file LoanGeneratorMapper.php.
|
protected |
Find the correct detail id in the schema template for this app and create the JSON array that will go into the field respapplication.
| array | $row | |
| array | $data | = entire data set for creation of JSON. |
Definition at line 192 of file LoanGeneratorMapper.php.
|
protected |
Here we attempt to map to the field in the detail template.
| array | $row | |
| array | $tpl |
Definition at line 238 of file LoanGeneratorMapper.php.
|
protected |
Parse fieldattr and return the array. Should never fail but . . .
| array | $field_arr |
Definition at line 289 of file LoanGeneratorMapper.php.
|
protected |
Attempt to locate the matching array key "responsetablefield" or "fieldcorename" If it matches the mapping of one or the other, return the record ID.
| string | $field | |
| array | $tpl |
Definition at line 265 of file LoanGeneratorMapper.php.
|
protected |
Map the CSV field $field to either the local response table field or core field name. This will tell us which "schema record id" to use in the JSON.
| $field | |
| $field_attr |
Definition at line 313 of file LoanGeneratorMapper.php.
|
protected |
Here we map the actual data to the record ID found and set in createJsonMap(). So what we have done is 1) Find the detailid in each field of this record's schemadetail by parsing the JSON of fieldattr in template, in the example below, 1234 2) Created an array associating our "json field names" with the CSV names as in 'productname' => 'formfield_1234' 4) Below we create the "finished" array with values associated with "json field names" as in 'formfield_1234' => 'HomeCu' 5) "Never time to do it right . . . ."
| array | $row | |
| array | $json_map |
Definition at line 219 of file LoanGeneratorMapper.php.
| LoanGeneratorMapper::mapRandomQuestionResponses | ( | $user_id, | |
| $test_credentials | |||
| ) |
Compile three sample challenge answers all this the same answer
| string | $test_credentials | |
| int | $user_id |
Definition at line 82 of file LoanGeneratorMapper.php.
| LoanGeneratorMapper::MapUserData | ( | $row, | |
| $test_credentials | |||
| ) |
map the user data
| array | $row | |
| string | $test_credentials |
Definition at line 124 of file LoanGeneratorMapper.php.
| LoanGeneratorMapper::MapUserLoan | ( | $user_id, | |
| $loan_id, | |||
| $row, | |||
| $data | |||
| ) |
map the loan data
| int | $user_id | |
| int | $loan_id | |
| array | $row | |
| array | $data | = entire data loan set |
| Exception |
Definition at line 152 of file LoanGeneratorMapper.php.
| LoanGeneratorMapper::masterSchemaMap | ( | $row | ) |
Map the lnappschemamaster table.
| array | $row |
| Exception |
Definition at line 61 of file LoanGeneratorMapper.php.
1.8.15