symfony API

sfConfig Class

« Back to API menu

action

addon

cache

config

controller

countable

database

debug

exception

filter

generator

helper

i18n

log

request

response

storage

test

user

util

validator

view

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

sfConfig stores all configuration information for a symfony application.

Method Summary

  • array getAll()
    Retrieves all configuration parameters.
  • add($parameters = array())
    Sets an array of config parameters.
  • mixed get($name, $default = null)
    Retrieves a config parameter.
  • set($name, $value)
    Sets a config parameter.
  • clear()
    Clears all current config parameters.
  • bool has($name)
    Indicates whether or not a config parameter exists.

Method Details

  • (array) getAll ()

    Retrieves all configuration parameters.

    returns An associative array of configuration parameters.

  • add ($parameters = array())

    $parameters An associative array of config parameters and their associated values

    Sets an array of config parameters.

    If an existing config parameter name matches any of the keys in the supplied array, the associated value will be overridden.

  • (mixed) get ($name, $default = null)

    $name A config parameter name
    $default A default config parameter value

    Retrieves a config parameter.

    returns A config parameter value, if the config parameter exists, otherwise null

  • set ($name, $value)

    $name A config parameter name
    $value A config parameter value

    Sets a config parameter.

    If a config parameter with the name already exists the value will be overridden.

  • clear ()

    Clears all current config parameters.

  • (bool) has ($name)

    $name A config parameter name

    Indicates whether or not a config parameter exists.

    returns true, if the config parameter exists, otherwise false