symfony API

sfParameterHolder Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.0 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.0 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfParameterHolder provides a base class for managing parameters.

Method Summary

  • void &()
    Remove A parameter namespace and all of its associated parameters.
  • void add(, )
    Set an array of parameters.
  • void addByRef(, )
    Set an array of parameters by reference.
  • void clear()
    Clear all parameters associated with this request.
  • string getDefaultNamespace()
    Get the default namespace value.
  • array getNames()
    Retrieve an array of parameter names from an optionally specified namespace.
  • array getNamespaces()
    Retrieve an array of parameter namespaces.
  • bool has(, )
    Indicates whether or not a parameter exists.
  • bool hasNamespace()
    Indicates whether or not A parameter namespace exists.
  • void set(, , )
    Set a parameter.
  • void setByRef(, , )
    Set a parameter by reference.
  • __construct()
    The constructor for sfParameterHolder.

Method Details

  • (void) & () Browse code

    Remove A parameter namespace and all of its associated parameters.

  • (void) add (, ) Browse code

    Set an array of parameters.


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

  • (void) addByRef (, ) Browse code

    Set an array of parameters by reference.


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

  • (void) clear () Browse code

    Clear all parameters associated with this request.

  • (string) getDefaultNamespace () Browse code

    Get the default namespace value.


    The $default_namespace is defined as 'symfony/default'.

    returns The default namespace.

  • (array) getNames () Browse code

    Retrieve an array of parameter names from an optionally specified namespace.

    returns An indexed array of parameter names, if the namespace exists, otherwise null.

  • (array) getNamespaces () Browse code

    Retrieve an array of parameter namespaces.

    returns An indexed array of parameter namespaces.

  • (bool) has (, ) Browse code

    Indicates whether or not a parameter exists.

    returns true, if the parameter exists, otherwise false.

  • (bool) hasNamespace () Browse code

    Indicates whether or not A parameter namespace exists.

    returns true, if the namespace exists, otherwise false.

  • (void) set (, , ) Browse code

    Set a parameter.


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

  • (void) setByRef (, , ) Browse code

    Set a parameter by reference.


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

  • __construct () Browse code

    The constructor for sfParameterHolder.


    The default namespace may be overridden at initialization as follows:

    $mySpecialPH = new sfParameterHolder('symfony/special');
    ?>