symfony API

sfConfig Class

« Back to API menu

action

addon

autoload

cache

command

config

controller

creole

database

debug

exception

filter

form

generator

helper

i18n

log

plugin

propel

request

response

routing

storage

task

test

user

util

validator

view

widget

You are currently browsing the symfony API for the 1.1 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