symfony API

sfConfigCache Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.3 version. Switch to:

sfConfigCache allows you to customize the format of a configuration file to

Method Summary

  • callHandler($handler, $configs, $cache)
    Loads a configuration handler.
  • string checkConfig($configPath, $optional)
    Checks to see if a configuration file has been modified and if so
  • clear()
    Clears all configuration cache files.
  • string getCacheName($config)
    Converts a normal filename into a cache filename.
  • sfConfigHandler getHandler($name)
    Returns the config handler configured for the given name
  • import($config, $once, $optional)
    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, $params)
    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) 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

  • clear () Browse code

    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

  • (sfConfigHandler) getHandler ($name) Browse code

    $name The config handler name

    Returns the config handler configured for the given name

    returns A sfConfigHandler instance

  • import ($config, $once, $optional) 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.

  • loadConfigHandlers () Browse code

    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, $params) 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