Handles saving and loading Magento's core_config_data values.
Can save and load PHP objects to core_config_data table.
Methods summary
final public
object|array|string
|
#
getBigConfigData( string $key, string|boolean $default = false, integer $storeId = null )
Behaves similar to Mage::getStoreConfig() method, but returns PHP objects
instead of strings
Behaves similar to Mage::getStoreConfig() method, but returns PHP objects
instead of strings
Parameters
- $key
string $key configuration key to fetch
- $default
string|boolean $default default value to return if the value does not exist or unserialization
failed
- $storeId
integer $storeId store id, to fetch the configuration value for
Returns
object|array|string
|
final public
string
|
#
setBigConfigData( string $key, object|array|string $value, string $scope = 'default', integer $scopeId = 0, boolean $skipFirst = false )
Stores PHP object to core_config_data table using object serialization.
Save procedure of stored object:
- serialize php object
- gzcompress the serialized result
- base64 encode the compressed result
- If the compressed result is larger than 64K, then the resulting blocks will
be saved under $key . $i ID, where $i starts with 0 and is incremented by 1 for
each consecutive 64K block.
Stores PHP object to core_config_data table using object serialization.
Save procedure of stored object:
- serialize php object
- gzcompress the serialized result
- base64 encode the compressed result
- If the compressed result is larger than 64K, then the resulting blocks will
be saved under $key . $i ID, where $i starts with 0 and is incremented by 1 for
each consecutive 64K block.
Parameters
- $key
string $key configuration key to store this value
- $value
object|array|string $value object to store into the configuration
- $scope
string $scope Magento's configuration scope
- $scopeId
integer $scopeId store ID this configuration will be saved to
- $skipFirst
boolean $skipFirst if this setting is true, then first segment will not be saved to
database using this function. Useful, when overriding
Mage_Core_Model_Config_Data saving functions.
Returns
string first saved segment of this saved configuration data.
|
final public
float
|
#
getConfigDataF( string $key, boolean|object $default = false, integer $storeId = null )
Behaves similar to Mage::getStoreConfig() but attempts to return the
resulting value as float.
Supports "." and "," as decimal separator
Behaves similar to Mage::getStoreConfig() but attempts to return the
resulting value as float.
Supports "." and "," as decimal separator
Parameters
- $key
string $key configuration key to load
- $default
boolean|object $default default value to return if the configuration value does not exist.
- $storeId
integer $storeId store id to load the configuration value for.
Returns
float
|
final public
array
|
#
getConfigDataA( string $key, boolean|object $default = false, integer $storeId = null )
Behaves similar to Mage::getStoreConfig() but returns array of elements,
where each element is one line of data contained. Empty lines are not
returned.
Behaves similar to Mage::getStoreConfig() but returns array of elements,
where each element is one line of data contained. Empty lines are not
returned.
Parameters
- $key
string $key configuration key to load
- $default
boolean|object $default default value to return if the configuration value does not exist.
- $storeId
integer $storeId store id to load the configuration value for.
Returns
array
|
final public
string
|
#
getConfigData( string $key, boolean|object $default = false, integer $storeId = null, boolean $asFloat = false )
Behaves similar to Mage::getStoreConfig() function and can return the value
as float.
Behaves similar to Mage::getStoreConfig() function and can return the value
as float.
Parameters
- $key
string $key configuration key to load
- $default
boolean|object $default default value to return if the configuration value does not exist.
- $storeId
integer $storeId store id to load the configuration value for.
- $asFloat
boolean $asFloat when true, then attemts to return the value as float
Returns
string
|
final public
Eabi_Livehandler_Helper_Data
|
#
setConfigData( string $key, string $value, string $scope = 'default', integer $scopeId = 0, boolean $resetCache = true )
Writes the core_config_data value to database and resets the cache.
Writes the core_config_data value to database and resets the cache.
Parameters
- $key
string $key Identification path to write the configuarion to.
- $value
string $value Value to store
- $scope
string $scope Magento's scope to apply
- $scopeId
integer $scopeId Store ID to apply
- $resetCache
boolean $resetCache If the cache should be reset after saving the configuration value.
Returns
|
final public
array
|
#
getAllStoreUrls( )
Returns all hosts for current Magento installation
Returns all hosts for current Magento installation
Returns
array
|
protected
Mage_Core_Model_Config_Data
|
|