sfConfigCache allows you to customize the format of a configuration file to
make it easy-to-use, yet still provide a PHP formatted result for direct
inclusion into your modules.
Method Summary
-
callHandler($handler, $configs, $cache)
Loads a configuration handler.
-
string
checkConfig($configPath, $optional = false)
Checks to see if a configuration file has been modified and if so
recompile the cache file associated with it.
-
clear()
Clears all configuration cache files.
-
string
getCacheName($config)
Converts a normal filename into a cache filename.
-
getHandler($name)
Returns the config handler configured for the given name
-
import($config, $once = true, $optional = false)
Imports a configuration file.
-
loadConfigHandlers()
Loads all configuration application and module level handlers.
-
mergeUserConfigHandlers()
Merges configuration handlers from the config_handlers.yml
-
registerConfigHandler($handler, (class) $class, $params = array())
Registers a configuration handler.
-
writeCacheFile($config, $cache, $data)
Writes a cache file.
-
__construct($configuration)
Constructor
Method Details
-
callHandler ($handler, $configs, $cache)
Browse code
| $handler |
The handler to use when parsing a configuration file
|
| $configs |
An array of absolute filesystem paths to configuration files
|
| $cache |
An absolute filesystem path to the cache file that will be written
|
Loads a configuration handler.
throws sfConfigurationException If a requested configuration file does not have an associated configuration handler
-
(string) checkConfig ($configPath, $optional = false)
Browse code
| $configPath |
A filesystem path to a configuration file
|
| $optional |
If true, config path does not need to exist
|
Checks to see if a configuration file has been modified and if so
recompile the cache file associated with it.
The recompilation only occurs in a non debug environment. If the configuration file path is relative, symfony will look in directories defined in the sfConfiguration::getConfigPaths() method.
returns An absolute filesystem path to the cache filename associated with this specified configuration file
throws sfConfigurationException If a requested configuration file does not exist
-
Clears all configuration cache files.
-
(string) getCacheName ($config)
Browse code
| $config |
A normal filename
|
Converts a normal filename into a cache filename.
returns An absolute filesystem path to a cache filename
-
| $name |
The config handler name
|
Returns the config handler configured for the given name
returns A sfConfigHandler instance
-
import ($config, $once = true, $optional = false)
Browse code
| $config |
A filesystem path to a configuration file
|
| $once |
Only allow this configuration file to be included once per request?
|
| $optional |
Only include if true
|
Imports a configuration file.
-
Loads all configuration application and module level handlers.
throws sfConfigurationException If a configuration related error occurs.
-
mergeUserConfigHandlers ()
Browse code
Merges configuration handlers from the config_handlers.yml
and the ones defined with registerConfigHandler()
-
registerConfigHandler ($handler, (class) $class, $params = array())
Browse code
| $handler |
The handler to use when parsing a configuration file
|
| $class |
A configuration handler class
|
| $params |
An array of options for the handler class initialization
|
Registers a configuration handler.
-
writeCacheFile ($config, $cache, $data)
Browse code
| $config |
An absolute filesystem path to a configuration file
|
| $cache |
An absolute filesystem path to the cache file that will be written
|
| $data |
Data to be written to the cache file
|
Writes a cache file.
throws sfCacheException If the cache file cannot be written
-
__construct ($configuration)
Browse code
| $configuration |
A sfApplicationConfiguration instance
|
Constructor
|