symfony API

sfFilter Class

« Back to API menu

action

addon

cache

config

controller

countable

database

debug

exception

filter

generator

helper

i18n

log

request

response

storage

test

user

util

validator

view

You are currently browsing the symfony documentation for the 1.0 version. Switch to:

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

Method Summary

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

Method Details

  • (boolean) isFirstCall ()

    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

  • (boolean) hasParameter ($name, $ns = null)

    $name The key name
    $ns The namespace to use

    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

  • (string) getParameter ($name, $default = null, $ns = null)

    $name The key name
    $default The default value
    $ns The namespace to use

    Gets the parameter associated with the given key.

    This is a shortcut for:

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

    returns The value associated with the key

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

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

    Initializes this Filter.

    returns true, if initialization completes successfully, otherwise false

    throws sfInitializationException If an error occurs while initializing this Filter

  • getContext ()

    Retrieves the current application context.

    returns The current sfContext instance

  • getParameterHolder ()

    Gets the parameter holder for this object.

    returns A sfParameterHolder instance

  • setParameter ($name, $value, $ns = null)

    $name The key name
    $value The value
    $ns The namespace to use

    Sets the value for the given key.

    This is a shortcut for:

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