symfony API

sfParameterHolder Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

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

Inheritence

sfViewParameterHolder, sfNamespacedParameterHolder  <  sfParameterHolder

Method Summary

  • array &()
    Retrieves an array of parameters.
  • add($parameters)
    Sets an array of parameters.
  • addByRef($parameters)
    Sets an array of parameters by reference.
  • clear()
    Clears all parameters associated with this request.
  • array getNames()
    Retrieves an array of parameter names.
  • bool has($name)
    Indicates whether or not a parameter exists.
  • string remove($name, $default)
    Remove a parameter.
  • array serialize()
    Serializes the current instance.
  • set($name, $value)
    Sets a parameter.
  • setByRef($name, $value)
    Sets a parameter by reference.
  • unserialize($serialized)
    Unserializes a sfParameterHolder instance.
  • __construct()
    The constructor for sfParameterHolder.

Method Details

  • (array) & ()

    Retrieves an array of parameters.

    returns An associative array of parameters

  • add ($parameters)

    $parameters An associative array of parameters and their associated values

    Sets 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)

    $parameters An associative array of parameters and references to their associated values

    Sets 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 ()

    Clears all parameters associated with this request.

  • (array) getNames ()

    Retrieves an array of parameter names.

    returns An indexed array of parameter names

  • (bool) has ($name)

    $name A parameter name

    Indicates whether or not a parameter exists.

    returns true, if the parameter exists, otherwise false

  • (string) remove ($name, $default)

    $name A parameter name
    $default A default parameter value

    Remove a parameter.

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

  • (array) serialize ()

    Serializes the current instance.

    returns Objects instance

  • set ($name, $value)

    $name A parameter name
    $value A parameter value

    Sets a parameter.


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

  • setByRef ($name, $value)

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

    Sets a parameter by reference.


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

  • unserialize ($serialized)

    $serialized A serialized sfParameterHolder instance

    Unserializes a sfParameterHolder instance.

  • __construct ()

    The constructor for sfParameterHolder.