Class Zend_Filter

Description

Implements interfaces:

Located in /Filter.php (line 33)


	
			
Class Constant Summary
 CHAIN_APPEND = 'append'
 CHAIN_PREPEND = 'prepend'
Variable Summary
 static array $_defaultNamespaces
 array $_filters
Method Summary
 static null addDefaultNamespaces (array|string $namespace)
 static mixed filterStatic (mixed $value, string $classBaseName, [ $args = array()], [array|string $namespaces = array()])
 static mixed get (mixed $value, string $classBaseName, [ $args = array()], [array|string $namespaces = array()])
 static array getDefaultNamespaces ()
 static boolean hasDefaultNamespaces ()
 static null setDefaultNamespaces (array|string $namespace)
 Zend_Filter addFilter (Zend_Filter_Interface $filter, [string $placement = self::CHAIN_APPEND])
 mixed filter (mixed $value)
 array getFilters ()
Variables
static array $_defaultNamespaces = array() (line 51)

Default Namespaces

  • access: protected
array $_filters = array() (line 44)

Filter chain

  • access: protected
Methods
static addDefaultNamespaces (line 150)

Adds a new default namespace

  • access: public
static null addDefaultNamespaces (array|string $namespace)
  • array|string $namespace
static filterStatic (line 207)

Returns a value filtered through a specified filter class, without requiring separate instantiation of the filter object.

The first argument of this method is a data input value, that you would have filtered. The second argument is a string, which corresponds to the basename of the filter class, relative to the Zend_Filter namespace. This method automatically loads the class, creates an instance, and applies the filter() method to the data input. You can also pass an array of constructor arguments, if they are needed for the filter class.

  • throws: Zend_Filter_Exception
  • access: public
static mixed filterStatic (mixed $value, string $classBaseName, [ $args = array()], [array|string $namespaces = array()])
  • mixed $value
  • string $classBaseName
  • array $args: OPTIONAL
  • array|string $namespaces: OPTIONAL
static get (line 180)
static mixed get (mixed $value, string $classBaseName, [ $args = array()], [array|string $namespaces = array()])
  • mixed $value
  • string $classBaseName
  • array $args: OPTIONAL
  • array|string $namespaces: OPTIONAL
static getDefaultNamespaces (line 124)

Returns the set default namespaces

  • access: public
static array getDefaultNamespaces ()
static hasDefaultNamespaces (line 164)

Returns true when defaultNamespaces are set

  • access: public
static boolean hasDefaultNamespaces ()
static setDefaultNamespaces (line 135)

Sets new default namespaces

  • access: public
static null setDefaultNamespaces (array|string $namespace)
  • array|string $namespace
addFilter (line 60)

Adds a filter to the chain

  • return: Provides a fluent interface
  • access: public
Zend_Filter addFilter (Zend_Filter_Interface $filter, [string $placement = self::CHAIN_APPEND])
appendFilter (line 76)

Add a filter to the end of the chain

  • return: Provides a fluent interface
  • access: public
Zend_Filter appendFilter (Zend_Filter_Interface $filter)
filter (line 110)

Returns $value filtered through each filter in the chain

Filters are run in the order in which they were added to the chain (FIFO)

  • access: public
mixed filter (mixed $value)
  • mixed $value

Implementation of:
Zend_Filter_Interface::filter()
Returns the result of filtering $value
getFilters (line 97)

Get all the filters

  • access: public
array getFilters ()
prependFilter (line 87)

Add a filter to the start of the chain

  • return: Provides a fluent interface
  • access: public
Zend_Filter prependFilter (Zend_Filter_Interface $filter)
Class Constants
CHAIN_APPEND = 'append' (line 36)
CHAIN_PREPEND = 'prepend' (line 37)

Documentation generated on Mon, 21 Jun 2010 15:23:44 -0400 by phpDocumentor 1.4.3