symfony API

sfYamlConfigHandler Class

« Back to API menu

1.0 API OpenSearch

Packages

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

sfYamlConfigHandler is a base class for YAML (.yml) configuration handlers. This class provides a central location for parsing YAML files and detecting required categories.

Method Summary

  • string parseYaml($configFile)
    Parses a YAML (.yml) configuration file.
  • array parseYamls($configFiles)
    Parses an array of YAMLs files and merges them in one configuration array.
  • string getConfigValue($keyName, $category, $defaultValue = null)
    Gets a configuration value for a given key and category.
  • string mergeConfigValue($keyName, $category)
    Merges configuration values for a given key and category.

Methods inherited from sfConfigHandler

execute , initialize , replaceConstants , replacePath , getParameterHolder

Method Details

  • (string) parseYaml ($configFile) Browse code

    $configFile An absolute filesystem path to a configuration file

    Parses a YAML (.yml) configuration file.

    returns A parsed .yml configuration

    throws sfParseException If a requested configuration file is improperly formatted

  • (array) parseYamls ($configFiles) Browse code

    $configFiles An array of configuration file paths

    Parses an array of YAMLs files and merges them in one configuration array.

    returns A merged configuration array

  • (string) getConfigValue ($keyName, $category, $defaultValue = null) Browse code

    $keyName The key name
    $category The category name
    $defaultValue The default value

    Gets a configuration value for a given key and category.

    returns The value associated with this key name and category

  • (string) mergeConfigValue ($keyName, $category) Browse code

    $keyName The key name
    $category The category name

    Merges configuration values for a given key and category.

    returns The value associated with this key name and category

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.