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
-
loadConfigHandlers()
Loads all configuration application and module level handlers.
-
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.
-
getInstance()
Retrieves the singleton instance of this class.
-
string
getCacheName($config)
Converts a normal filename into a cache filename.
-
writeCacheFile($config, $cache, [[[amp]]]$data)
Writes a cache file.
-
callHandler($handler, $configs, $cache)
Loads a configuration handler.
-
import($config, $once = true, $optional = false)
Imports a configuration file.
-
clear()
Clears all configuration cache files.
Method Details
-
loadConfigHandlers ()
Loads all configuration application and module level handlers.
throws sfConfigurationException If a configuration related error occurs.
-
(string) checkConfig ($configPath, $optional = false)
| $configPath |
A filesystem path to a configuration file |
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 sfLoader::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
-
getInstance ()
Retrieves the singleton instance of this class.
returns A sfConfigCache instance
-
(string) getCacheName ($config)
| $config |
A normal filename |
Converts a normal filename into a cache filename.
returns An absolute filesystem path to a cache filename
-
writeCacheFile ($config, $cache, [[[amp]]]$data)
| $config |
An absolute filesystem path to a configuration file |
| $cache |
An absolute filesystem path to the cache file that will be written |
| [[[amp]]]$data |
Data to be written to the cache file |
Writes a cache file.
throws sfCacheException If the cache file cannot be written
-
callHandler ($handler, $configs, $cache)
| $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
-
import ($config, $once = true, $optional = false)
| $config |
A filesystem path to a configuration file |
| $once |
Only allow this configuration file to be included once per request? |
Imports a configuration file.
-
clear ()
Clears all configuration cache files.
|