symfony API

sfFilter Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

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

sfFilter provides a way for you to intercept incoming requests or outgoing responses.

Method Summary

  • getContext()
    Retrieves the current application context.
  • string getParameter($name, $default = null)
    Gets the parameter associated with the given key.
  • getParameterHolder()
    Gets the parameter holder for this object.
  • boolean hasParameter($name)
    Returns true if the given key exists in the parameter holder.
  • boolean initialize((sfContext) $context, $parameters = array())
    Initializes this Filter.
  • boolean isFirstCall()
    Returns true if this is the first call to the sfFilter instance.
  • setParameter($name, $value)
    Sets the value for the given key.
  • __construct($context, $parameters = array())
    Class constructor.

Method Details

  • getContext () Browse code

    Retrieves the current application context.

    returns The current sfContext instance

  • (string) getParameter ($name, $default = null) Browse code

    $name The key name
    $default The default value

    Gets the parameter associated with the given key.


    This is a shortcut for:

    $this->getParameterHolder()->get()

    returns The value associated with the key

  • getParameterHolder () Browse code

    Gets the parameter holder for this object.

    returns A sfParameterHolder instance

  • (boolean) hasParameter ($name) Browse code

    $name The key name

    Returns true if the given key exists in the parameter holder.


    This is a shortcut for:

    $this->getParameterHolder()->has()

    returns true if the given key exists, false otherwise

  • (boolean) initialize ((sfContext) $context, $parameters = array()) Browse code

    $context The current application context
    $parameters An associative array of initialization parameters

    Initializes this Filter.

    returns true

  • (boolean) isFirstCall () Browse code

    Returns true if this is the first call to the sfFilter instance.

    returns true if this is the first call to the sfFilter instance, false otherwise

  • setParameter ($name, $value) Browse code

    $name The key name
    $value The value

    Sets the value for the given key.


    This is a shortcut for:

    $this->getParameterHolder()->set()

  • __construct ($context, $parameters = array()) Browse code

    $context
    $parameters

    Class constructor.