 Inheritance diagram for oxErpGenImport:
 Inheritance diagram for oxErpGenImport: Collaboration diagram for oxErpGenImport:
 Collaboration diagram for oxErpGenImport:| Public Member Functions | |
| __call ($sMethod, $aArgs) | |
| __construct () | |
| getInstanceOfType ($sType) | |
| getImportObject ($sType) | |
| setImportTypePrefix ($sType) | |
| getImportObjectsList () | |
| init ($sUserName, $sPassword, $iShopID=1, $iLanguage=0) | |
| setCsvFileFieldsOrder ($aCsvFields) | |
| setCsvContainsHeader ($blCsvContainsHeader) | |
| getTotalImportedRowsNumber () | |
| doImport ($sPath=null, $sUserName=null, $sUserPassword=null, $sShopId=null, $sShopLanguage=null) | |
| Protected Member Functions | |
| _setDbLayerVersion () | |
| _modifyData ($aData, $oType) | |
| _mapFields ($aData, $oType) | |
| _getImportType (&$aData) | |
| _getImportMode ($aData) | |
| _getCsvFieldsTerminator () | |
| _getCsvFieldsEncolser () | |
| Protected Attributes | |
| $_aObjects | |
| $_aCsvFileFieldsOrder = array() | |
| $_blCsvContainsHeader = null | |
| $_sDefaultStringTerminator = ";" | |
| $_sDefaultStringEncloser = '"' | |
Class handeling csv import
Definition at line 7 of file oxerpgenimport.php.
| oxErpGenImport.__construct | ( | ) | 
| oxErpGenImport.__call | ( | $ | sMethod, | |
| $ | aArgs | |||
| ) | 
Only used for convenience in UNIT tests by doing so we avoid writing extended classes for testing protected or private methods
| string | $sMethod Methods name | |
| array | $aArgs Argument array | 
| oxSystemComponentException | Throws an exception if the called method does not exist or is not accessable in current class | 
Reimplemented from oxERPBase.
Definition at line 67 of file oxerpgenimport.php.
| oxErpGenImport._getCsvFieldsEncolser | ( | ) |  [protected] | 
| oxErpGenImport._getCsvFieldsTerminator | ( | ) |  [protected] | 
| oxErpGenImport._getImportMode | ( | $ | aData | ) |  [protected] | 
Gets import mode
| array | $aData CSV data | 
Reimplemented from oxErpCsv.
Definition at line 185 of file oxerpgenimport.php.
| oxErpGenImport._getImportType | ( | &$ | aData | ) |  [protected] | 
Gets import object type according type prefix
| array | &$aData CSV data | 
| Exeption | if no such import type prefix | 
Reimplemented from oxErpCsv.
Definition at line 167 of file oxerpgenimport.php.
| oxErpGenImport._mapFields | ( | $ | aData, | |
| $ | oType | |||
| ) |  [protected] | 
Maps numeric array to assoc. Array
| array | $aData numeric indices | |
| object | $oType object type | 
Definition at line 139 of file oxerpgenimport.php.
| oxErpGenImport._modifyData | ( | $ | aData, | |
| $ | oType | |||
| ) |  [protected] | 
Modyfies data befor import. Calls method for object fields and csv data mapping.
| array | $aData CSV data | |
| object | $oType object type | 
Reimplemented from oxErpCsv.
Definition at line 126 of file oxerpgenimport.php.
| oxErpGenImport._setDbLayerVersion | ( | ) |  [protected] | 
| oxErpGenImport.doImport | ( | $ | sPath = null, | |
| $ | sUserName = null, | |||
| $ | sUserPassword = null, | |||
| $ | sShopId = null, | |||
| $ | sShopLanguage = null | |||
| ) | 
Main import method, whole import of all types via a given csv file is done here
| string | $sPath full path of the CSV file. | |
| string | $sUserName user name | |
| string | $sUserPassword password | |
| integer | $sShopId shop ID | |
| integer | $sShopLanguage language ID | 
Definition at line 314 of file oxerpgenimport.php.
| oxErpGenImport.getImportObject | ( | $ | sType | ) | 
Get imort object according import type
| string | $sType import object type | 
Definition at line 197 of file oxerpgenimport.php.
| oxErpGenImport.getImportObjectsList | ( | ) | 
Get allowed for import objects list
Definition at line 224 of file oxerpgenimport.php.
| oxErpGenImport.getInstanceOfType | ( | $ | sType | ) | 
Get instance of type
| string | $sType instance type | 
| Exeption | type not supported | 
Definition at line 100 of file oxerpgenimport.php.
| oxErpGenImport.getTotalImportedRowsNumber | ( | ) | 
Get successfully imported rows number
Definition at line 297 of file oxerpgenimport.php.
| oxErpGenImport.init | ( | $ | sUserName, | |
| $ | sPassword, | |||
| $ | iShopID = 1, | |||
| $ | iLanguage = 0 | |||
| ) | 
Init ERP Framework parameters Creates Objects, checks Rights etc.
| mixed | $sUserName user name | |
| mixed | $sPassword password | |
| integer | $iShopID shop ID | |
| integer | $iLanguage language ID | 
Reimplemented from oxERPBase.
Definition at line 244 of file oxerpgenimport.php.
| oxErpGenImport.setCsvContainsHeader | ( | $ | blCsvContainsHeader | ) | 
Set if CSV file contains header row
| bool | $blCsvContainsHeader has or not file header | 
Definition at line 287 of file oxerpgenimport.php.
| oxErpGenImport.setCsvFileFieldsOrder | ( | $ | aCsvFields | ) | 
Set CSV file comumns names
| array | $aCsvFields CSV fields | 
Definition at line 275 of file oxerpgenimport.php.
| oxErpGenImport.setImportTypePrefix | ( | $ | sType | ) | 
Set import object type prefix
| string | $sType import type prefix | 
Definition at line 214 of file oxerpgenimport.php.
| oxErpGenImport.$_aCsvFileFieldsOrder = array()  [protected] | 
Definition at line 35 of file oxerpgenimport.php.
| oxErpGenImport.$_aObjects  [protected] | 
 array    (
                                'A' => 'article',
                                'K' => 'category',
                                'H' => 'vendor',
                                'C' => 'crossselling',
                                'Z' => 'accessoire',
                                'T' => 'article2category',
                                'I' => 'article2action',
                                'P' => 'scaleprice',
                                'U' => 'user',
                                'O' => 'order',
                                'R' => 'orderarticle',
                                'N' => 'country',
                                'Y' => 'artextends',
                            )
Definition at line 15 of file oxerpgenimport.php.
| oxErpGenImport.$_blCsvContainsHeader = null  [protected] | 
Definition at line 42 of file oxerpgenimport.php.
| oxErpGenImport.$_sDefaultStringEncloser = '"'  [protected] | 
Definition at line 54 of file oxerpgenimport.php.
| oxErpGenImport.$_sDefaultStringTerminator = ";"  [protected] | 
Definition at line 48 of file oxerpgenimport.php.
 1.7.1
 1.7.1