Property | Type | Description | |
---|---|---|---|
$entityTypes | array | ||
$results | array | ||
$sources | array |
Property | Type | Description | |
---|---|---|---|
$clientRepo | |||
$contactRepo | |||
$invoiceRepo | |||
$processedRows | array | ||
$productRepo | |||
$transformer |
Method | Description | |
---|---|---|
__construct ( League\Fractal\Manager $manager, |
ImportService constructor. | |
getTransformer ( $source, $entityType, $maps ) : mixed | ||
getTransformerClassName ( $source, $entityType ) : string | ||
importCSV ( array $maps, $headers ) : array | ||
importFiles ( $source, $files ) : array | ||
importJSON ( $file ) : array | ||
mapCSV ( array $files ) : array | ||
mapFile ( $entityType, $filename, $columns, $map ) : array | ||
removeIdFields ( $array ) : mixed |
Method | Description | |
---|---|---|
addClientToMaps ( |
||
addExpenseCategoryToMaps ( |
||
addExpenseToMaps ( |
||
addFailure ( $entityType, $data ) | ||
addInvoiceToMaps ( |
||
addProductToMaps ( |
||
addSuccess ( $entity ) | ||
addVendorToMaps ( |
||
checkClientCount ( $count ) | ||
checkData ( $entityType, $count ) | ||
checkForMatch ( $column, $pattern ) : boolean | ||
convertToObject ( $entityType, $data, $map ) : stdClas\stdClass | ||
createPayment ( $source, $data, $clientId, $invoiceId ) | ||
execute ( $source, $entityType, $file ) : array | ||
executeCSV ( $entityType, $map, $hasHeaders ) : array | ||
init ( ) | ||
initMaps ( ) | ||
saveData ( $source, $entityType, $row, $data_index ) : mixed | ||
transformRow ( $source, $entityType, $row ) : boolean | mixed |
public __construct ( League\Fractal\Manager $manager, |
||
$manager | League\Fractal\Manager | |
$clientRepo | ||
$invoiceRepo | ||
$paymentRepo | ||
$contactRepo | ||
$productRepo | ||
$expenseRepo | ||
$vendorRepo | ||
$expenseCategoryRepo |
public static getTransformer ( $source, $entityType, $maps ) : mixed | ||
$source | ||
$entityType | ||
$maps | ||
return | mixed |
public static getTransformerClassName ( $source, $entityType ) : string | ||
$source | ||
$entityType | ||
return | string |
public importFiles ( $source, $files ) : array | ||
$source | ||
$files | ||
return | array |
protected ClientRepository,App\Ninja\Repositories $clientRepo | ||
return |
protected ContactRepository,App\Ninja\Repositories $contactRepo | ||
return |
protected InvoiceRepository,App\Ninja\Repositories $invoiceRepo | ||
return |
protected ProductRepository,App\Ninja\Repositories $productRepo | ||
return |