symfony API

sfNamespacedParameterHolder 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:

sfNamespacedParameterHolder provides a class for managing parameters

Inheritence

sfNamespacedParameterHolder  <  sfParameterHolder

Method Summary

  • &($ns)
    Remove A parameter namespace and all of its associated parameters.
  • add($parameters, $ns)
    Set an array of parameters.
  • addByRef($parameters, $ns)
    Set an array of parameters by reference.
  • clear()
    Clear all parameters associated with this request.
  • string getDefaultNamespace()
    Get the default namespace value.
  • array getNames($ns)
    Retrieve an array of parameter names from an optionally specified namespace.
  • array getNamespaces()
    Retrieve an array of parameter namespaces.
  • bool has($name, $ns)
    Indicates whether or not a parameter exists.
  • bool hasNamespace($ns)
    Indicates whether or not A parameter namespace exists.
  • string remove($name, $default, $ns)
    Remove a parameter.
  • array serialize()
    Serializes the current instance.
  • set($name, $value, $ns)
    Set a parameter.
  • setByRef($name, $value, $ns)
    Set a parameter by reference.
  • setDefaultNamespace($namespace, $move)
    Sets the default namespace value.
  • unserialize($serialized)
    Unserializes a sfNamespacedParameterHolder instance.
  • __construct()
    The constructor for sfNamespacedParameterHolder.

Methods inherited from sfParameterHolder

& , add , addByRef , clear , getNames , has , remove , serialize , set , setByRef , unserialize , __construct

Method Details

  • & ($ns) Browse code

    $ns A parameter namespace.

    Remove A parameter namespace and all of its associated parameters.

  • add ($parameters, $ns) Browse code

    $parameters An associative array of parameters and their associated values
    $ns A parameter namespace

    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.

  • addByRef ($parameters, $ns) Browse code

    $parameters An associative array of parameters and references to their associated values
    $ns A parameter namespace

    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.

  • 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 ($ns) Browse code

    $ns A parameter namespace.

    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 ($name, $ns) Browse code

    $name A parameter name
    $ns A parameter namespace

    Indicates whether or not a parameter exists.

    returns true, if the parameter exists, otherwise false

  • (bool) hasNamespace ($ns) Browse code

    $ns A parameter namespace

    Indicates whether or not A parameter namespace exists.

    returns true, if the namespace exists, otherwise false

  • (string) remove ($name, $default, $ns) Browse code

    $name A parameter name
    $default A default parameter value
    $ns A parameter namespace

    Remove a parameter.

    returns A parameter value, if the parameter was removed, otherwise null

  • (array) serialize () Browse code

    Serializes the current instance.

    returns Objects instance

  • set ($name, $value, $ns) Browse code

    $name A parameter name
    $value A parameter value
    $ns A parameter namespace

    Set a parameter.


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

  • setByRef ($name, $value, $ns) Browse code

    $name A parameter name
    $value A reference to a parameter value
    $ns A parameter namespace

    Set a parameter by reference.


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

  • setDefaultNamespace ($namespace, $move) Browse code

    $namespace Default namespace
    $move Move all values of the old default namespace to the new one or not

    Sets the default namespace value.

  • unserialize ($serialized) Browse code

    $serialized A serialized sfNamespacedParameterHolder instance

    Unserializes a sfNamespacedParameterHolder instance.

  • __construct () Browse code

    The constructor for sfNamespacedParameterHolder.


    The default namespace may be overridden at initialization as follows:

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