List of all members.
Public Member Functions |
| oxNew ($sClassName) |
| oxNewArticle ($sOxID, $aProperties=array()) |
| resetInstanceCache ($sClassName=null) |
| generateUId () |
| getClassName ($sClassName) |
| getShopId () |
| getModuleVar ($sModuleVarName) |
| setModuleVar ($sModuleVarName, $aValues) |
Static Public Member Functions |
static | getInstance () |
static | setClassInstance ($sClassName, $oInstance) |
static | resetClassInstances () |
static | resetModuleVars () |
Public Attributes |
const | CACHE_FILE_PREFIX = "config" |
Protected Member Functions |
| _getObject ($sClassName, $iArgCnt, $aParams) |
| _getActiveModuleChain ($aClassChain) |
| _makeSafeModuleClassParents ($aClassChain, $sBaseModule) |
| _getConfKey () |
| _getShopUrlMap () |
| _getCacheDir () |
| _getCacheFileName ($sModuleVarName, $sShopId=null) |
| _getModuleVarFromDB ($sModuleVarName) |
| _getFromCache ($sModuleVarName, $blSubshopSpecific=true) |
| _setToCache ($sVarName, $sValue, $blSubshopSpecific=true) |
Protected Attributes |
| $_aClassNameCache = array() |
Static Protected Attributes |
static | $_aLoadedArticles = array() |
static | $_aInstanceCache = array() |
static | $_aModuleVars = array() |
static | $_aClassInstances = array() |
Static Private Attributes |
static | $_instance = null |
Detailed Description
Object Factory implementation (oxNew() method is implemented in this class).
Definition at line 6 of file oxutilsobject.php.
Member Function Documentation
oxUtilsObject._getActiveModuleChain |
( |
$ |
aClassChain |
) |
[protected] |
Checks if module is disabled, added to aDisabledModules config.
- Parameters:
-
| array | $aClassChain Module names |
- Returns:
- array
Definition at line 338 of file oxutilsobject.php.
oxUtilsObject._getCacheDir |
( |
|
) |
[protected] |
oxUtilsObject._getCacheFileName |
( |
$ |
sModuleVarName, |
|
|
$ |
sShopId = null | |
|
) |
| | [protected] |
Returns module file cache name.
- Parameters:
-
| string | $sModuleVarName Module variable name |
| int | $sShopId Shop id |
- Returns:
- string
Definition at line 604 of file oxutilsobject.php.
oxUtilsObject._getConfKey |
( |
|
) |
[protected] |
Returns configuration key. This method is independent from oxConfig functionality.
- Returns:
- string
Definition at line 520 of file oxutilsobject.php.
oxUtilsObject._getFromCache |
( |
$ |
sModuleVarName, |
|
|
$ |
blSubshopSpecific = true | |
|
) |
| | [protected] |
Returns shop module variable value from cache. This method is independent from oxConfig class and does not use database.
- Parameters:
-
| string | $sModuleVarName Module variable name |
| bool | $blSubshopSpecific Indicates should cache be shop specific or not |
- Returns:
- string
Definition at line 652 of file oxutilsobject.php.
oxUtilsObject._getModuleVarFromDB |
( |
$ |
sModuleVarName |
) |
[protected] |
Returns shop module variable value directly from database.
- Parameters:
-
| string | $sModuleVarName Module variable name |
- Returns:
- string
Definition at line 626 of file oxutilsobject.php.
oxUtilsObject._getObject |
( |
$ |
sClassName, |
|
|
$ |
iArgCnt, |
|
|
$ |
aParams | |
|
) |
| | [protected] |
Creates object with dynamic constructor parameters. If parameter count > 5 - exception is thrown
- Parameters:
-
| string | $sClassName class name |
| int | $iArgCnt argument count |
| array | $aParams constructor parameters |
- Exceptions:
-
- Returns:
- mixed
Definition at line 189 of file oxutilsobject.php.
oxUtilsObject._getShopUrlMap |
( |
|
) |
[protected] |
Returns shop url to id map from config.
- Returns:
- array
Definition at line 532 of file oxutilsobject.php.
oxUtilsObject._makeSafeModuleClassParents |
( |
$ |
aClassChain, |
|
|
$ |
sBaseModule | |
|
) |
| | [protected] |
Creates middle classes if needed.
- Parameters:
-
| array | $aClassChain Module names |
| string | $sBaseModule Oxid base class |
- Exceptions:
-
- Returns:
- string
Definition at line 393 of file oxutilsobject.php.
oxUtilsObject._setToCache |
( |
$ |
sVarName, |
|
|
$ |
sValue, |
|
|
$ |
blSubshopSpecific = true | |
|
) |
| | [protected] |
Writes shop module variable information to cache.
- Parameters:
-
| string | $sVarName Variable name |
| string | $sValue Variable value. |
| bool | $blSubshopSpecific Indicates should cache be shop specific or not |
- Returns:
- null;
Definition at line 678 of file oxutilsobject.php.
oxUtilsObject.generateUId |
( |
|
) |
|
oxUtilsObject.getClassName |
( |
$ |
sClassName |
) |
|
Returns name of class file, according to class name.
- Parameters:
-
| string | $sClassName Class name |
- Returns:
- string
Definition at line 295 of file oxutilsobject.php.
static oxUtilsObject.getInstance |
( |
|
) |
[static] |
oxUtilsObject.getModuleVar |
( |
$ |
sModuleVarName |
) |
|
Retrieves module configuration variable for the base shop. Currently getModuleVar() is expected to be called with one of the values: aModules | aDisabledModules | aModulePaths This method is independent from oxConfig functionality.
- Parameters:
-
| string | $sModuleVarName Configuration array name |
- Returns:
- array
Definition at line 474 of file oxutilsobject.php.
oxUtilsObject.getShopId |
( |
|
) |
|
Returns active shop id. This method works independently from other classes.
- Returns:
- string
Definition at line 460 of file oxutilsobject.php.
oxUtilsObject.oxNew |
( |
$ |
sClassName |
) |
|
Creates and returns new object. If creation is not available, dies and outputs error message.
- Parameters:
-
| string | $sClassName Name of class |
- Exceptions:
-
- Returns:
- object
Definition at line 134 of file oxutilsobject.php.
oxUtilsObject.oxNewArticle |
( |
$ |
sOxID, |
|
|
$ |
aProperties = array() | |
|
) |
| | |
Creates and returns oxArticle (or subclass) object.
- Parameters:
-
| string | $sOxID ID to load subclass type from database |
| array | $aProperties array of properties to assign |
- Deprecated:
- since v4.7.5-5.0.5 (2013-03-29); use oxNew
- Returns:
- object
Definition at line 233 of file oxutilsobject.php.
static oxUtilsObject.resetClassInstances |
( |
|
) |
[static] |
oxUtilsObject.resetInstanceCache |
( |
$ |
sClassName = null |
) |
|
Resests instance cache
- Parameters:
-
| string | $sClassName class name in the cache |
- Returns:
- null;
Definition at line 259 of file oxutilsobject.php.
static oxUtilsObject.resetModuleVars |
( |
|
) |
[static] |
Resets previously set module information.
- Returns:
- null;
Definition at line 109 of file oxutilsobject.php.
static oxUtilsObject.setClassInstance |
( |
$ |
sClassName, |
|
|
$ |
oInstance | |
|
) |
| | [static] |
Factory instance setter. Sets the instance to be returned over later called oxNew(). This method is mostly intended to be used by phpUnit tests.
- Parameters:
-
| string | $sClassName Class name expected to be later supplied over oxNew |
| object | $oInstance Instance object |
- Returns:
- null;
Definition at line 86 of file oxutilsobject.php.
oxUtilsObject.setModuleVar |
( |
$ |
sModuleVarName, |
|
|
$ |
aValues | |
|
) |
| | |
Sets module information variable. The variable is set statically and is not saved for future.
- Parameters:
-
| string | $sModuleVarName Configuration array name |
| array | $aValues Module name values |
- Returns:
- null
Definition at line 504 of file oxutilsobject.php.
Member Data Documentation
oxUtilsObject.$_aClassInstances = array() [static, protected] |
oxUtilsObject.$_aClassNameCache = array() [protected] |
oxUtilsObject.$_aInstanceCache = array() [static, protected] |
oxUtilsObject.$_aLoadedArticles = array() [static, protected] |
oxUtilsObject.$_aModuleVars = array() [static, protected] |
oxUtilsObject.$_instance = null [static, private] |
The documentation for this class was generated from the following file: