symfony API

sfFilter Class

« Back to API menu

action

addon

autoload

cache

command

config

controller

creole

database

debug

exception

filter

form

generator

helper

i18n

log

plugin

propel

request

response

routing

storage

task

test

user

util

validator

view

widget

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

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

Method Summary

  • __construct($context, $parameters = array())
    Class constructor.
  • boolean isFirstCall()
    Returns true if this is the first call to the sfFilter instance.
  • boolean hasParameter($name)
    Returns true if the given key exists in the parameter holder.
  • string getParameter($name, $default = 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)
    Sets the value for the given key.

Method Details

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

    Class constructor.

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

    $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

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

    $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

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

    $name The key name
    $value The value

    Sets the value for the given key.

    This is a shortcut for:

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