Class Mage_ImportExport_Model_Import_Entity_Abstract

Description

Import entity abstract model

Located in /ImportExport/Model/Import/Entity/Abstract.php (line 34)


	
			
Direct descendents
Class Description
Mage_ImportExport_Model_Import_Entity_Customer_Address Import entity customer address
Mage_ImportExport_Model_Import_Entity_Customer Import entity customer model
Mage_ImportExport_Model_Import_Entity_Product Import entity product model
Class Constant Summary
Variable Summary
Method Summary
Variables
Varien_Adapter_Pdo_Mysql $_connection (line 50)

DB connection.

  • access: protected
Mage_ImportExport_Model_Mysql4_Import_Data $_dataSourceModel (line 64)

DB data source model.

  • access: protected
bool $_dataValidated = false (line 57)

Has data process validation done?

  • access: protected
int $_entityTypeId (line 71)

Entity type id.

  • access: protected
array $_errors = array() (line 78)

Error codes with arrays of corresponding row numbers.

  • access: protected
int $_errorsCount = 0 (line 85)

Error counter.

  • access: protected
int $_errorsLimit = 100 (line 92)

Limit of errors after which pre-processing will exit.

  • access: protected
bool $_importAllowed = true (line 99)

Flag to disable import.

  • access: protected
array $_indexValueAttributes = array() (line 106)

Attributes with index (not label) value.

  • access: protected

Redefined in descendants as:
array $_invalidRows = array() (line 113)

Array of invalid rows numbers.

  • access: protected
array $_messageTemplates = array() (line 120)

Validation failure message template definitions.

  • access: protected

Redefined in descendants as:
array $_notices = array() (line 127)

Notice messages.

  • access: protected
array $_parameters = array() (line 134)

Entity model parameters.

  • access: protected
array $_particularAttributes = array() (line 141)

Column names that holds values with particular meaning.

  • access: protected

Redefined in descendants as:
array $_permanentAttributes = array() (line 148)

Permanent entity columns.

  • access: protected

Redefined in descendants as:
int $_processedEntitiesCount = 0 (line 155)

Number of entities processed by validation.

  • access: protected
int $_processedRowsCount = 0 (line 162)

Number of rows processed by validation.

  • access: protected
array $_rowsToSkip = array() (line 173)

Rows to skip. Valid rows but we have some reasons to skip them.

[Row number 1] => true, ... [Row number N] => true

  • access: protected

Source model.

  • access: protected
array $_validatedRows = array() (line 180)

Array of numbers of validated rows as keys and boolean TRUE as values.

  • access: protected
Methods
Constructor __construct (line 194)

Constructor.

  • access: public
void __construct ()

Redefined in descendants as:
addMessageTemplate (line 325)

Add message template for specific error code from outside.

  • access: public
Mage_ImportExport_Model_Import_Entity_Abstract addMessageTemplate (string $errorCode, string $message)
  • string $errorCode: Error code
  • string $message: Message template
addRowError (line 309)

Add error with corresponding current data source row number.

  • access: public
Mage_ImportExport_Model_Import_Adapter_Abstract addRowError (string $errorCode, int $errorRowNum, [string $colName = null])
  • string $errorCode: Error code or simply column name
  • int $errorRowNum: Row number.
  • string $colName: OPTIONAL Column name.
getAttributeOptions (line 339)

Returns attributes all values in label-value or value-value pairs form. Labels are lower-cased.

  • access: public
array getAttributeOptions ( $attribute, [array $indexValAttrs = array()])
getBehavior (line 374)

Import behavior getter.

  • access: public
string getBehavior ()
getEntityTypeCode (line 391)

EAV entity type code getter.

  • abstract:
  • access: public
string getEntityTypeCode ()

Redefined in descendants as:
getEntityTypeId (line 398)

Entity type ID getter.

  • access: public
int getEntityTypeId ()
getErrorMessages (line 408)

Returns error information grouped by error types and translated (if possible).

  • access: public
array getErrorMessages ()
getErrorsCount (line 430)

Returns error counter value.

  • access: public
int getErrorsCount ()
getErrorsLimit (line 440)

Returns error limit value.

  • access: public
int getErrorsLimit ()
getInvalidRowsCount (line 450)

Returns invalid rows count.

  • access: public
int getInvalidRowsCount ()
getNextAutoincrement (line 462)

Find net value of autoincrement key for specified table.

  • throws: Exception
  • access: public
string getNextAutoincrement (string $tableName)
  • string $tableName
getNotices (line 477)

Returns model notices.

  • access: public
array getNotices ()
getProcessedEntitiesCount (line 487)

Returns number of checked entities.

  • access: public
int getProcessedEntitiesCount ()
getProcessedRowsCount (line 497)

Returns number of checked rows.

  • access: public
int getProcessedRowsCount ()
getSource (line 508)

Source object getter.

  • throws: Exception
  • access: public
importData (line 521)

Import process start.

  • return: Result of operation.
  • access: public
bool importData ()
isAttributeParticular (line 532)

Is attribute contains particular data (not plain entity attribute).

  • access: public
bool isAttributeParticular (string $attrCode)
  • string $attrCode

Redefined in descendants as:
isAttributeValid (line 546)

Check one attribute. Can be overridden in child.

  • access: public
boolean isAttributeValid (string $attrCode,  $attrParams,  $rowData, int $rowNum)
  • string $attrCode: Attribute code
  • array $attrParams: Attribute params
  • array $rowData: Row data
  • int $rowNum
isDataValid (line 588)

Is all of data valid?

  • access: public
bool isDataValid ()
isImportAllowed (line 599)

Import possibility getter.

  • access: public
bool isImportAllowed ()
isRowAllowedToImport (line 611)

Returns TRUE if row is valid and not in skipped rows array.

  • access: public
bool isRowAllowedToImport ( $rowData, int $rowNum)
  • array $rowData
  • int $rowNum
setParameters (line 631)

Set data from outside to change behavior. I.e. for setting some default parameters etc.

  • access: public
  • array $params
validateData (line 657)

Validate data.

  • throws: Exception
  • access: public
validateRow (line 623)

Validate data row.

  • abstract:
  • access: public
boolean validateRow ( $rowData, int $rowNum)
  • array $rowData
  • int $rowNum

Redefined in descendants as:
_getSource (line 207)

Inner source object getter.

  • access: protected
_importData (line 221)

Import data rows.

  • abstract:
  • access: protected
boolean _importData ()

Redefined in descendants as:
_isRowScopeDefault (line 229)

Returns boolean TRUE if row scope is default (fundamental) scope.

  • access: protected
bool _isRowScopeDefault ( $rowData)
  • array $rowData
_prepareRowForDb (line 240)

Change row data before saving in DB table.

  • access: protected
array _prepareRowForDb ( $rowData)
  • array $rowData

Redefined in descendants as:
_saveValidatedBunches (line 250)

Validate data rows and save bunches to DB.

  • access: protected
Class Constants
DB_MAX_PACKET_COEFFICIENT = 900000 (line 40)

Database constants

DB_MAX_PACKET_DATA = 1048576 (line 41)
DB_MAX_TEXT_LENGTH = 65536 (line 43)
DB_MAX_VARCHAR_LENGTH = 256 (line 42)

Documentation generated on Fri, 11 Feb 2011 16:55:16 +0200 by phpDocumentor 1.4.3