Methods summary
public
|
#
__construct( mixed $sourceData = null )
Class construct
Parameters
- $sourceData
mixed $sourceData
Overrides
|
public
Mage_Core_Store_Mysql4_Config
|
#
getResourceModel( )
Get config resource model
Get config resource model
Returns
Mage_Core_Store_Mysql4_Config
|
public
Mage_Core_Model_Config_Options
|
#
getOptions( )
Get configuration options object
Get configuration options object
Returns
|
public
Mage_Core_Model_Config
|
#
setOptions( array $options )
Set configuration options
Set configuration options
Parameters
Returns
|
public
Mage_Core_Model_Config
|
#
init( mixed $options = array() )
Initialization of core configuration
Initialization of core configuration
Returns
|
public
Mage_Core_Model_Config
|
#
loadBase( )
Load base system configuration (config.xml and local.xml files)
Load base system configuration (config.xml and local.xml files)
Returns
|
public
boolean
|
#
loadModulesCache( )
Load cached modules configuration
Load cached modules configuration
Returns
boolean
|
public
Mage_Core_Model_Config
|
#
loadModules( )
Load modules configuration
Load modules configuration
Returns
|
public
boolean
|
#
isLocalConfigLoaded( )
Check if local configuration (DB connection, etc) is loaded
Check if local configuration (DB connection, etc) is loaded
Returns
boolean
|
public
Mage_Core_Model_Config
|
#
loadDb( )
Load config data from DB
Returns
|
public
Mage_Core_Model_Config
|
#
reinit( array $options = array() )
Reinitialize configuration
Reinitialize configuration
Parameters
Returns
|
protected
boolean
|
#
_canUseLocalModules( )
Check local modules enable/disable flag If local modules are disbled remove
local modules path from include dirs
Check local modules enable/disable flag If local modules are disbled remove
local modules path from include dirs
return true if local modules enabled and false if disabled
Returns
boolean
|
protected
boolean
|
#
_canUseCacheForInit( )
Check if cache can be used for config initialization
Check if cache can be used for config initialization
Returns
boolean
|
public
Zend_Cache_Frontend_File
|
#
getCache( )
Retrieve cache object
Returns
Zend_Cache_Frontend_File
|
protected
string
|
#
_getCacheLockId( )
Get lock flag cache identifier
Get lock flag cache identifier
Returns
string
|
public
Mage_Core_Model_Config
|
#
saveCache( array $tags = array() )
Save configuration cache
Parameters
- $tags
array $tags cache tags
Returns
|
protected
Mage_Core_Model_Config
|
#
_saveSectionCache( string $idPrefix, string $sectionName, Varien_Simplexml_Element $source, integer $recursionLevel = 0, mixed $tags = array() )
Save cache of specified
Parameters
- $idPrefix
string $idPrefix cache id prefix
- $sectionName
string $sectionName
- $source
Varien_Simplexml_Element $source
- $recursionLevel
integer $recursionLevel
- $tags
Returns
|
protected
Varien_Simplexml_Element
|
#
_loadSectionCache( string $sectionName )
Load config section cached data
Load config section cached data
Parameters
- $sectionName
string $sectionName
Returns
Varien_Simplexml_Element
|
protected
string
|
#
_loadCache( string $id )
Load cached data by identifier
Load cached data by identifier
Parameters
Returns
string
|
protected
Mage_Core_Model_Config
|
#
_saveCache( string $data, string $id, array $tags = array(), false|integer $lifetime = false )
Save cache data
Parameters
- $data
string $data
- $id
string $id
- $tags
array $tags
- $lifetime
false|integer $lifetime
Returns
|
protected
Mage_Core_Model_Config
|
#
_removeCache( string $id )
Clear cache data by id
Parameters
Returns
|
public
Mage_Core_Model_Config
|
#
removeCache( )
Remove configuration cache
Remove configuration cache
Returns
|
public
Mage_Core_Model_Config
|
#
cleanCache( )
Configuration cache clean process
Configuration cache clean process
Returns
|
protected
Mage_Core_Model_Config_Element
|
#
_getSectionConfig( array $path )
Getter for section configuration object
Getter for section configuration object
Parameters
Returns
|
public
Mage_Core_Model_Config
|
#
getSectionNode( array $path )
Get node value from cached section data
Get node value from cached section data
Parameters
Returns
|
public
Mage_Core_Model_Config_Element
|
#
getNode( string $path = null, string $scope = '', string|integer $scopeCode = null )
Returns node found by the $path and scope info
Returns node found by the $path and scope info
Parameters
- $path
string $path
- $scope
string $scope
- $scopeCode
string|integer $scopeCode
Returns
|
public
Varien_Simplexml_Config
|
#
setNode( string $path, string $value, boolean $overwrite = true )
Create node by $path and set its value.
Create node by $path and set its value.
Parameters
- $path
string $path separated by slashes
- $value
string $value
- $overwrite
boolean $overwrite
Returns
Varien_Simplexml_Config
|
protected
array
|
|
public
Mage_Core_Model_Config
|
#
addAllowedModules( strung|array $module )
Add module(s) to allowed list
Add module(s) to allowed list
Parameters
- $module
strung|array $module
Returns
|
protected
boolean
|
#
_isAllowedModule( string $moduleName )
Define if module is allowed
Define if module is allowed
Parameters
- $moduleName
string $moduleName
Returns
boolean
|
protected
Mage_Core_Model_Config
|
#
_loadDeclaredModules( null $mergeConfig = null )
Load declared modules configuration
Load declared modules configuration
Parameters
- $mergeConfig
null $mergeConfig depricated
Returns
|
protected
array
|
#
_sortModuleDepends( array $modules )
Sort modules and check depends
Sort modules and check depends
Parameters
Returns
array
|
public
string
|
#
determineOmittedNamespace( string $name, boolean $asFullModuleName = false )
Determine whether provided name begins from any available modules, according
to namespaces priority If matched, returns as the matched module "factory" name
or a fully qualified module name
Determine whether provided name begins from any available modules, according
to namespaces priority If matched, returns as the matched module "factory" name
or a fully qualified module name
Parameters
- $name
string $name
- $asFullModuleName
boolean $asFullModuleName
Returns
string
|
public
Mage_Core_Model_Config_Base
|
#
loadModulesConfiguration( string $fileName, null|Mage_Core_Model_Config_Base $mergeToObject = null, mixed $mergeModel = null )
Iterate all active modules "etc" folders and combine data from specidied xml
file name to one object
Iterate all active modules "etc" folders and combine data from specidied xml
file name to one object
Parameters
Returns
|
public
string
|
#
getTempVarDir( )
Retrieve temporary directory path
Retrieve temporary directory path
Returns
string
|
public
array
|
#
getDistroServerVars( )
Get default server variables values
Get default server variables values
Returns
array
|
public
|
|
public
Varien_Simplexml_Object
|
#
getModuleConfig( string $moduleName = '' )
Get module config node
Parameters
- $moduleName
string $moduleName
Returns
Varien_Simplexml_Object
|
public
object
|
#
getModuleSetup( string|Varien_Simplexml_Object $module = '' )
Get module setup class instance.
Get module setup class instance.
Defaults to Mage_Core_Setup
Parameters
- $module
string|Varien_Simplexml_Object $module
Returns
object
|
public
string
|
#
getVarDir( string $path = null, string $type = 'var' )
Get temporary data directory name
Get temporary data directory name
Parameters
- $path
string $path
- $type
string $type
Returns
string
|
public
|
|
public
string
|
#
getModuleDir( string $type, string $moduleName )
Get module directory by directory type
Get module directory by directory type
Parameters
- $type
string $type
- $moduleName
string $moduleName
Returns
string
|
public
boolean
|
#
loadEventObservers( string $area )
Load event observers for an area (front, admin)
Load event observers for an area (front, admin)
Parameters
Returns
boolean
|
public
array
|
#
getPathVars( array|string $args = null )
Get standard path variables.
Get standard path variables.
To be used in blocks, templates, etc.
Parameters
- $args
array|string $args Module name if string
Returns
array
|
public
string
|
#
getGroupedClassName( string $groupType, string $classId, string $groupRootNode = null )
Retrieve class name by class group
Retrieve class name by class group
Parameters
- $groupType
string $groupType currently supported model, block, helper
- $classId
string $classId slash separated class identifier, ex. group/class
- $groupRootNode
string $groupRootNode optional config path for group config
Returns
string
|
public
string
|
#
getBlockClassName( string $blockType )
Retrieve block class name
Retrieve block class name
Parameters
- $blockType
string $blockType
Returns
string
|
public
string
|
#
getHelperClassName( string $helperName )
Retrieve helper class name
Retrieve helper class name
Parameters
Returns
string
|
public
Mage_Core_Model_Resource_Helper_Abstract |false
|
#
getResourceHelper( string $moduleName )
Retreive resource helper instance
Retreive resource helper instance
Example: $config->getResourceHelper('cms') will instantiate
Mage_Cms_Model_Resource_Helper_<db_adapter_name>
Parameters
- $moduleName
string $moduleName
Returns
|
public
string
|
#
getModelClassName( sting $modelClass )
Retrieve module class name
Retrieve module class name
Parameters
- $modelClass
sting $modelClass
Returns
string
|
public
Mage_Core_Model_Abstract |false
|
#
getModelInstance( string $modelClass = '', array|object $constructArguments = array() )
Get model class instance.
Get model class instance.
Example: $config->getModelInstance('catalog/product')
Will instantiate Mage_Catalog_Model_Mysql4_Product
Parameters
- $modelClass
string $modelClass
- $constructArguments
array|object $constructArguments
Returns
|
public
|
|
public
object
|
#
getResourceModelInstance( string $modelClass = '', array $constructArguments = array() )
Get resource model object by alias
Get resource model object by alias
Parameters
- $modelClass
string $modelClass
- $constructArguments
array $constructArguments
Returns
object
|
public
Varien_Simplexml_Object
|
#
getResourceConfig( string $name )
Get resource configuration for resource name
Get resource configuration for resource name
Parameters
Returns
Varien_Simplexml_Object
|
public
Varien_Simplexml_Element
|
#
getResourceConnectionConfig( string $name )
Get connection configuration
Get connection configuration
Parameters
Returns
Varien_Simplexml_Element
|
public
Varien_Simplexml_Object
|
#
getResourceTypeConfig( string $type )
Retrieve resource type configuration for resource name
Retrieve resource type configuration for resource name
Parameters
Returns
Varien_Simplexml_Object
|
public
array
|
#
getStoresConfigByPath( string $path, array $allowValues = array(), mixed $useAsKey = 'id' )
Retrieve store Ids for $path with checking
Retrieve store Ids for $path with checking
if empty $allowValues then retrieve all stores values
return array($storeId=>$pathValue)
Parameters
- $path
string $path
- $allowValues
array $allowValues
- $useAsKey
Returns
array
|
public
boolean
|
#
shouldUrlBeSecure( string $url )
Check whether given path should be secure according to configuration security
requirements for URL "Secure" should not be confused with https protocol, it is
about web/secure/*_url settings usage only
Check whether given path should be secure according to configuration security
requirements for URL "Secure" should not be confused with https protocol, it is
about web/secure/*_url settings usage only
Parameters
Returns
boolean
|
public
string
|
#
getTablePrefix( )
Get DB table names prefix
Get DB table names prefix
Returns
string
|
public
Mage_Core_Model_Config_Element
|
#
getEventConfig( string $area, string $eventName )
Get events configuration
Parameters
- $area
string $area event area
- $eventName
string $eventName event name
Returns
|
public
Mage_Core_Store_Config
|
#
saveConfig( string $path, string $value, string $scope = 'default', integer $scopeId = 0 )
Save config value to DB
Parameters
- $path
string $path
- $value
string $value
- $scope
string $scope
- $scopeId
integer $scopeId
Returns
Mage_Core_Store_Config
|
public
Mage_Core_Model_Config
|
#
deleteConfig( string $path, string $scope = 'default', integer $scopeId = 0 )
Delete config value from DB
Delete config value from DB
Parameters
- $path
string $path
- $scope
string $scope
- $scopeId
integer $scopeId
Returns
|
public
null|array
|
#
getFieldset( string $name, string $root = 'global' )
Get fieldset from configuration
Get fieldset from configuration
Parameters
- $name
string $name fieldset name
- $root
string $root fieldset area, could be 'admin'
Returns
null|array
|
protected
string
|
#
_getResourceConnectionModel( string $moduleName = null )
Retrieve resource connection model name
Retrieve resource connection model name
Parameters
- $moduleName
string $moduleName
Returns
string
|
protected
string|false
|
#
_getResourceModelFactoryClassName( string $modelClass )
Get factory class name for a resource
Get factory class name for a resource
Parameters
- $modelClass
string $modelClass
Returns
string|false
|
public
string|false
|
#
getResourceModelClassName( string $modelClass )
Get a resource model class name
Get a resource model class name
Parameters
- $modelClass
string $modelClass
Returns
string|false
|
Properties summary
protected
boolean
|
$_useCache
|
false |
#
Flag which allow use cache logic
Flag which allow use cache logic
|
protected
array
|
$_cacheSections
|
array(
'admin' => 0,
'adminhtml' => 0,
'crontab' => 0,
'install' => 0,
'stores' => 1,
'websites' => 0
) |
#
Instructions for spitting config cache array(
$sectionName => $recursionLevel ) Recursion level provide availability cache
subnodes separatly
Instructions for spitting config cache array( $sectionName =>
$recursionLevel ) Recursion level provide availability cache subnodes
separatly
|
protected
array
|
$_cacheLoadedSections
|
array() |
#
Loaded Configuration by cached sections
Loaded Configuration by cached sections
|
protected
Mage_Core_Model_Config_Options
|
$_options
|
|
|
protected
array
|
$_classNameCache
|
array() |
#
Storage for generated class names
Storage for generated class names
|
protected
unknown_type
|
$_blockClassNameCache
|
array() |
#
Storage for generated block class names
Storage for generated block class names
|
protected
array
|
$_secureUrlCache
|
array() |
#
Storage of validated secure urls
Storage of validated secure urls
|
protected
array
|
$_distroServerVars
|
|
#
System environment server variables
System environment server variables
|
protected
array
|
$_substServerVars
|
|
#
Array which is using for replace placeholders of server variables
Array which is using for replace placeholders of server variables
|
protected
Mage_Core_Model_Mysql4_Config
|
$_resourceModel
|
|
#
Resource model Used for operations with DB
Resource model Used for operations with DB
|
protected
array
|
$_eventAreas
|
|
#
Configuration for events by area
Configuration for events by area
|
protected
array
|
$_dirExists
|
array() |
#
Flag cache for existing or already created directories
Flag cache for existing or already created directories
|
protected
boolean
|
$_allowCacheForInit
|
true |
#
Flach which allow using cache for config initialization
Flach which allow using cache for config initialization
|
protected
array
|
$_cachePartsForSave
|
array() |
#
Property used during cache save process
Property used during cache save process
|
protected
Mage_Core_Model_Config_Base
|
$_prototype
|
|
#
Empty configuration object for loading and megring configuration parts
Empty configuration object for loading and megring configuration parts
|
protected
boolean
|
$_isLocalConfigLoaded
|
false |
#
Flag which identify what local configuration is loaded
Flag which identify what local configuration is loaded
|
protected
mixed
|
$_customEtcDir
|
null |
|
protected
boolean
|
$_canUseLocalModules
|
null |
#
Flag which allow to use modules from local code pool
Flag which allow to use modules from local code pool
|
private
array
|
$_moduleNamespaces
|
null |
#
Active modules array per namespace
Active modules array per namespace
|
protected
array
|
$_allowedModules
|
array() |
#
Modules allowed to load If empty - all modules are allowed
Modules allowed to load If empty - all modules are allowed
|