symfony API

sfParameterHolder Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 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) & () Browse code

    Retrieves an array of parameters.

    returns An associative array of parameters

  • add ($parameters) Browse code

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

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

    Clears all parameters associated with this request.

  • (array) getNames () Browse code

    Retrieves an array of parameter names.

    returns An indexed array of parameter names

  • (bool) has ($name) Browse code

    $name A parameter name

    Indicates whether or not a parameter exists.

    returns true, if the parameter exists, otherwise false

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

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

    Serializes the current instance.

    returns Objects instance

  • set ($name, $value) Browse code

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

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

    $serialized A serialized sfParameterHolder instance

    Unserializes a sfParameterHolder instance.

  • __construct () Browse code

    The constructor for sfParameterHolder.