Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes

oxERPBase Class Reference

Inheritance diagram for oxERPBase:
Collaboration diagram for oxERPBase:

List of all members.

Public Member Functions

 getStatistics ()
 getSessionID ()
 getImportData ()
 __call ($sMethod, $aArguments)
 init ($sUserName, $sPassword, $iShopID=1, $iLanguage=0)
 loadSessionData ($sSessionID)
 exportType ($sType, $sWhere=null, $iStart=null, $iCount=null, $sSortFieldName=null, $sSortType=null)
 import ()

Static Public Member Functions

static getRequestedVersion ()
static getUsedDbFieldsVersion ()
static setVersion ($sDbLayerVersion= '')

Public Attributes

 $_aStatistics = array()
 $_iIdx = 0

Static Public Attributes

static $ERROR_USER_WRONG = "ERROR: Could not login"
static $ERROR_USER_NO_RIGHTS = "Not sufficient rights to perform operation!"
static $ERROR_USER_EXISTS = "ERROR: User already exists"
static $ERROR_NO_INIT = "Init not executed, Access denied!"
static $ERROR_DELETE_NO_EMPTY_CATEGORY = "Only empty category can be deleated"
static $ERROR_OBJECT_NOT_EXISTING = "Object does not exist"
static $MODE_IMPORT = "Import"
static $MODE_DELETE = "Delete"

Protected Member Functions

 _beforeExport ($sType)
 _afterExport ($sType)
 _beforeImport ()
 _afterImport ()
 _getImportType (&$aData)
 _getImportMode ($aData)
 _modifyData ($aData, $oType)
 _getInstanceOfType ($sType)
 _export ($sType, $sWhere, $iStart=null, $iCount=null, $sSortFieldName=null, $sSortType=null)
 _outputMappingArray ($sTable)
 _getKeyID ($oType, $aData)
 _resetIdx ()
 _nextIdx ()
 _checkAccess ($oType, $blWrite, $sOxid=null)
 _importOne ()
 _save (oxERPType $oType, $aData, $blAllowCustomShopId=false)

Protected Attributes

 $_blInit = false
 $_iLanguage = null
 $_sUserID = null
 $_sSID = null

Static Protected Attributes

static $_sRequestedVersion = ''
static $_aDbLayer2ShopDbVersions

Detailed Description

oxERPBase

Author:
Lars Jankowfsky Copyright (c) 2006
Version:
Id:
oxerpbase.php 25471 2010-02-01 14:35:11Z alfonsas

public

Definition at line 13 of file oxerpbase.php.


Member Function Documentation

oxERPBase.__call ( sMethod,
aArguments 
)

default fallback if some handler is missing

Parameters:
string $sMethod method to call
array $aArguments method arguments
Returns:
null

Reimplemented in oxErpGenImport.

Definition at line 179 of file oxerpbase.php.

oxERPBase._afterExport ( sType  )  [abstract, protected]

Method which must be called after export

Parameters:
string $sType export object type
Returns:
mixed

Reimplemented in oxErpCsv.

oxERPBase._afterImport (  )  [abstract, protected]

Method which must be called after import

Returns:
mixed

Reimplemented in oxErpCsv.

oxERPBase._beforeExport ( sType  )  [abstract, protected]

Method which must be called before export

Parameters:
string $sType export type
Returns:
mixed

Reimplemented in oxErpCsv.

oxERPBase._beforeImport (  )  [abstract, protected]

Method which must be called before import

Returns:
mixed

Reimplemented in oxErpCsv.

oxERPBase._checkAccess ( oType,
blWrite,
sOxid = null 
) [protected]

Checks if user as sufficient rights

Parameters:
object $oType type object
boolean $blWrite access mode
integer $sOxid object id
Returns:
null

Definition at line 475 of file oxerpbase.php.

oxERPBase._export ( sType,
sWhere,
iStart = null,
iCount = null,
sSortFieldName = null,
sSortType = null 
) [protected]

Exports one type

Parameters:
string $sType object type
string $sWhere where condition
int $iStart start fetch records from
int $iCount number of records to export
string $sSortFieldName sorting field name
string $sSortType sorting direction
Returns:
null

Definition at line 327 of file oxerpbase.php.

oxERPBase._getImportMode ( aData  )  [abstract, protected]

Import mode getter

Parameters:
array $aData import data
Returns:
mixed

Reimplemented in oxErpCsv, and oxErpGenImport.

oxERPBase._getImportType ( &$  aData  )  [abstract, protected]

Import type getter

Parameters:
array &$aData import data
Returns:
mixed

Reimplemented in oxErpCsv, and oxErpGenImport.

oxERPBase._getInstanceOfType ( sType  )  [protected]

Factory for ERP types

Parameters:
string $sType instance type
Returns:
object

Reimplemented in oxErpCsv.

Definition at line 302 of file oxerpbase.php.

oxERPBase._getKeyID ( oType,
aData 
) [protected]

Returns record id

Parameters:
object $oType type object
object $aData field data
Returns:
string

Definition at line 402 of file oxerpbase.php.

oxERPBase._importOne (  )  [protected]

Main Import Handler, imports one row/call/object...

Returns:
boolean

Definition at line 552 of file oxerpbase.php.

oxERPBase._modifyData ( aData,
oType 
) [abstract, protected]

Abstract data modifier

Parameters:
array $aData data to modify
object $oType type object
Returns:
mixed

Reimplemented in oxErpCsv, and oxErpGenImport.

oxERPBase._nextIdx (  )  [protected]

Increase import counter, if retry is detected, only failed imports are repeated

Returns:
null

Definition at line 456 of file oxerpbase.php.

oxERPBase._outputMappingArray ( sTable  )  [protected]

Just used for developing

Parameters:
array $sTable name of table to output its mapping
Returns:
null

Definition at line 381 of file oxerpbase.php.

oxERPBase._resetIdx (  )  [protected]

Reset import counter, if retry is detected, only failed imports are repeated

Returns:
null

Definition at line 441 of file oxerpbase.php.

oxERPBase._save ( oxERPType oType,
aData,
blAllowCustomShopId = false 
) [protected]

Insert or Update a Row into database

Parameters:
oxERPType $oType object to save
array $aData assoc. array with fieldnames, values what should be stored in this table
bool $blAllowCustomShopId if TRUE custom shop id allowed
Returns:
string | false

Definition at line 603 of file oxerpbase.php.

oxERPBase.exportType ( sType,
sWhere = null,
iStart = null,
iCount = null,
sSortFieldName = null,
sSortType = null 
)

Export one object type

Parameters:
string $sType object type
string $sWhere where condition
int $iStart start fetch records from
int $iCount number of records to export
string $sSortFieldName sorting field name
string $sSortType sorting direction
Returns:
null

Definition at line 275 of file oxerpbase.php.

oxERPBase.getImportData (  )  [abstract]

Import data getter

Returns:
mixed

Reimplemented in oxErpCsv.

static oxERPBase.getRequestedVersion (  )  [static]

gets requested db layer version

Returns:
string

Definition at line 627 of file oxerpbase.php.

oxERPBase.getSessionID (  ) 

Sesstion id getter

Returns:
string

Definition at line 99 of file oxerpbase.php.

oxERPBase.getStatistics (  ) 

Statistics getter

Returns:
array

Definition at line 89 of file oxerpbase.php.

static oxERPBase.getUsedDbFieldsVersion (  )  [static]

gets requested version for db fields used

Returns:
string

Definition at line 647 of file oxerpbase.php.

oxERPBase.import (  ) 

imports all data set up before

Returns:
null

Reimplemented in oxErpCsv.

Definition at line 287 of file oxerpbase.php.

oxERPBase.init ( sUserName,
sPassword,
iShopID = 1,
iLanguage = 0 
)

oxERPBase.Init() Init ERP Framework Creates Objects, checks Rights etc.

Parameters:
mixed $sUserName user login name
mixed $sPassword user password
integer $iShopID shop id
integer $iLanguage language id
Returns:
boolean

Reimplemented in oxErpGenImport.

Definition at line 204 of file oxerpbase.php.

oxERPBase.loadSessionData ( sSessionID  )  [abstract]

oxERPBase.loadSessionData()

different handeling for SOAP request and CSV usage (V0.1)

Parameters:
string $sSessionID session id
Returns:
null

Reimplemented in oxErpCsv.

static oxERPBase.setVersion ( sDbLayerVersion = ''  )  [static]

gets requested db layer version

Parameters:
string $sDbLayerVersion database layer version
Returns:
null

Definition at line 659 of file oxerpbase.php.


Member Data Documentation

oxERPBase.$_aDbLayer2ShopDbVersions [static, protected]
Initial value:
 array(
        '1' => '1', '1.1' => '1', '2' => '2',
    )

Definition at line 66 of file oxerpbase.php.

oxERPBase.$_aStatistics = array()

Definition at line 75 of file oxerpbase.php.

oxERPBase.$_blInit = false [protected]

Definition at line 30 of file oxerpbase.php.

oxERPBase.$_iIdx = 0

Definition at line 82 of file oxerpbase.php.

oxERPBase.$_iLanguage = null [protected]

Definition at line 37 of file oxerpbase.php.

oxERPBase.$_sRequestedVersion = '' [static, protected]

Definition at line 58 of file oxerpbase.php.

oxERPBase.$_sSID = null [protected]

Definition at line 51 of file oxerpbase.php.

oxERPBase.$_sUserID = null [protected]

Definition at line 44 of file oxerpbase.php.

oxERPBase.$ERROR_DELETE_NO_EMPTY_CATEGORY = "Only empty category can be deleated" [static]

Definition at line 19 of file oxerpbase.php.

oxERPBase.$ERROR_NO_INIT = "Init not executed, Access denied!" [static]

Definition at line 18 of file oxerpbase.php.

oxERPBase.$ERROR_OBJECT_NOT_EXISTING = "Object does not exist" [static]

Definition at line 20 of file oxerpbase.php.

oxERPBase.$ERROR_USER_EXISTS = "ERROR: User already exists" [static]

Definition at line 17 of file oxerpbase.php.

oxERPBase.$ERROR_USER_NO_RIGHTS = "Not sufficient rights to perform operation!" [static]

Definition at line 16 of file oxerpbase.php.

oxERPBase.$ERROR_USER_WRONG = "ERROR: Could not login" [static]

Definition at line 15 of file oxerpbase.php.

oxERPBase.$MODE_DELETE = "Delete" [static]

Definition at line 23 of file oxerpbase.php.

oxERPBase.$MODE_IMPORT = "Import" [static]

Definition at line 22 of file oxerpbase.php.


The documentation for this class was generated from the following file: