Object Factory implementation (oxNew() method is implemented in this class).
◆ __construct()
OxidEsales\EshopCommunity\Core\UtilsObject::__construct |
( |
|
$classNameProvider = null , |
|
|
|
$moduleChainsGenerator = null , |
|
|
|
$shopIdCalculator = null |
|
) |
| |
This class is a singleton and should be instantiated with getInstance().
- Deprecated:
- in v6.0 (2017-02-27) The constructor will be protected in the future. Use getInstance() instead.
- Parameters
-
◆ _disableModule()
OxidEsales\EshopCommunity\Core\UtilsObject::_disableModule |
( |
|
$sModule | ) |
|
|
protected |
Disables module
- Parameters
-
- Deprecated:
- use ModuleChainsGenerator::disableModule instead.
◆ generateUId()
OxidEsales\EshopCommunity\Core\UtilsObject::generateUId |
( |
| ) |
|
Returns generated unique ID.
- Returns
- string
◆ getClassAliasName()
OxidEsales\EshopCommunity\Core\UtilsObject::getClassAliasName |
( |
|
$className | ) |
|
Method returns class alias by given class name.
- Parameters
-
string | $className | with namespace. |
- Returns
- string|null
◆ getClassName()
OxidEsales\EshopCommunity\Core\UtilsObject::getClassName |
( |
|
$classAlias | ) |
|
Returns name of class file, according to class name.
- Parameters
-
string | $classAlias | Class name |
- Returns
- string
◆ getClassNameProvider()
OxidEsales\EshopCommunity\Core\UtilsObject::getClassNameProvider |
( |
| ) |
|
|
protected |
◆ getInstance()
static OxidEsales\EshopCommunity\Core\UtilsObject::getInstance |
( |
| ) |
|
|
static |
◆ getModuleChainsGenerator()
OxidEsales\EshopCommunity\Core\UtilsObject::getModuleChainsGenerator |
( |
| ) |
|
|
protected |
- Returns
- ModuleChainsGenerator
◆ getModuleVar()
OxidEsales\EshopCommunity\Core\UtilsObject::getModuleVar |
( |
|
$variableName | ) |
|
Returns module variable value from configuration by given name.
- Parameters
-
- Deprecated:
- use ModuleVariablesLocator::getModuleVariable()
- Returns
- mixed
◆ getShopId()
OxidEsales\EshopCommunity\Core\UtilsObject::getShopId |
( |
| ) |
|
Returns shop id.
- Deprecated:
- use \OxidEsales\Eshop\Core\Config::getShopId() or \OxidEsales\Eshop\Core\ShopIdCalculator::getShopId instead.
- Returns
- string
◆ getShopIdCalculator()
OxidEsales\EshopCommunity\Core\UtilsObject::getShopIdCalculator |
( |
| ) |
|
|
protected |
◆ oxNew()
OxidEsales\EshopCommunity\Core\UtilsObject::oxNew |
( |
|
$className | ) |
|
Creates and returns new object. If creation is not available, dies and outputs error message.
- Parameters
-
string | $className | Name of class |
- Exceptions
-
SystemComponentException | in case that class does not exists |
- Returns
- object
◆ resetClassInstances()
static OxidEsales\EshopCommunity\Core\UtilsObject::resetClassInstances |
( |
| ) |
|
|
static |
Resets previously set instances
◆ resetInstanceCache()
OxidEsales\EshopCommunity\Core\UtilsObject::resetInstanceCache |
( |
|
$className = null | ) |
|
Resets instance cache
- Parameters
-
string | $className | class name in the cache |
- Returns
- null;
◆ resetModuleVars()
static OxidEsales\EshopCommunity\Core\UtilsObject::resetModuleVars |
( |
| ) |
|
|
static |
Resets module variables cache.
- Deprecated:
- use ModuleVariablesLocator::resetModuleVars instead.
◆ setClassInstance()
static OxidEsales\EshopCommunity\Core\UtilsObject::setClassInstance |
( |
|
$className, |
|
|
|
$instance |
|
) |
| |
|
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 | $className | Class name expected to be later supplied over oxNew |
object | $instance | Instance object |
◆ setModuleVar()
OxidEsales\EshopCommunity\Core\UtilsObject::setModuleVar |
( |
|
$variableName, |
|
|
|
$value |
|
) |
| |
Sets module variable value to configuration by given name.
- Parameters
-
string | $variableName | |
mixed | $value | |
- Deprecated:
- use ModuleVariablesLocator::setModuleVariable()
◆ shouldCacheObject()
OxidEsales\EshopCommunity\Core\UtilsObject::shouldCacheObject |
( |
|
$className, |
|
|
|
$arguments |
|
) |
| |
|
protected |
Checks whether class with arguments should be cached. Cache only when object has none or one scalar argument.
- Parameters
-
string | $className | |
array | $arguments | |
- Returns
- bool
◆ $_aClassInstances
OxidEsales\EshopCommunity\Core\UtilsObject::$_aClassInstances = [] |
|
staticprotected |
◆ $_aClassNameCache
OxidEsales\EshopCommunity\Core\UtilsObject::$_aClassNameCache = [] |
|
protected |
◆ $_aInstanceCache
OxidEsales\EshopCommunity\Core\UtilsObject::$_aInstanceCache = [] |
|
staticprotected |
◆ $_aLoadedArticles
OxidEsales\EshopCommunity\Core\UtilsObject::$_aLoadedArticles = [] |
|
staticprotected |
◆ $_instance
OxidEsales\EshopCommunity\Core\UtilsObject::$_instance = null |
|
staticprotected |
◆ $classNameProvider
OxidEsales\EshopCommunity\Core\UtilsObject::$classNameProvider = null |
|
private |
◆ $moduleChainsGenerator
OxidEsales\EshopCommunity\Core\UtilsObject::$moduleChainsGenerator = null |
|
private |
◆ $shopIdCalculator
OxidEsales\EshopCommunity\Core\UtilsObject::$shopIdCalculator = null |
|
private |
The documentation for this class was generated from the following file: