API Documentation

Filter.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Filter
version
$Id: Filter.php 21097 2010-02-19 20:11:34Z thomas $
Classes
Zend_Filter

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Filter

Implements
Zend_Filter_Interface
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Filter
Constants
CHAIN_APPEND
CHAIN_PREPEND
Properties
$_filters
$_defaultNamespaces
Methods
addFilter
appendFilter
prependFilter
getFilters
filter
getDefaultNamespaces
setDefaultNamespaces
addDefaultNamespaces
hasDefaultNamespaces
get
filterStatic

Description

Constants

CHAIN_APPEND

 CHAIN_APPEND = 'append'

Details

value
append

CHAIN_PREPEND

 CHAIN_PREPEND = 'prepend'

Details

value
prepend

Properties

$_defaultNamespaces

array $_defaultNamespaces = 'array'

Default Namespaces

Details

$_defaultNamespaces
array
visibility
protected
default
array
final
false
static
true

$_filters

array $_filters = 'array'

Filter chain

Details

$_filters
array
visibility
protected
default
array
final
false
static
false

Methods

addDefaultNamespaces

addDefaultNamespaces( array|string $namespace ) : null

Adds a new default namespace

Arguments
$namespace
arraystring
Output
null
Details
visibility
public
final
false
static
true

addFilter

addFilter( Zend_Filter_Interface $filter, string $placement = self ) : Zend_Filter

Adds a filter to the chain

Arguments
$filter
Zend_Filter_Interface
$placement
string
Output
Zend_Filter
Provides a fluent interface
Details
visibility
public
final
false
static
false

appendFilter

appendFilter( Zend_Filter_Interface $filter ) : Zend_Filter

Add a filter to the end of the chain

Arguments
$filter
Zend_Filter_Interface
Output
Zend_Filter
Provides a fluent interface
Details
visibility
public
final
false
static
false

filter

filter( mixed $value ) : mixed

Returns $value filtered through each filter in the chain

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

Arguments
$value
mixed
Output
mixed
Details
visibility
public
final
false
static
false

filterStatic

filterStatic( mixed $value, string $classBaseName, array $args = array, array|string $namespaces = array ) : mixed

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.

Arguments
$value
mixed
$classBaseName
string
$args
array
OPTIONAL
$namespaces
arraystring
OPTIONAL
Output
mixed
Details
visibility
public
final
false
static
true
throws

get

get( mixed $value, string $classBaseName, array $args = array, array|string $namespaces = array ) : mixed

Arguments
$value
mixed
$classBaseName
string
$args
array
OPTIONAL
$namespaces
arraystring
OPTIONAL
Output
mixed
Details
visibility
public
final
false
static
true
deprecated
see
Zend_Filter::filterStatic()
throws

getDefaultNamespaces

getDefaultNamespaces( ) : array

Returns the set default namespaces

Output
array
Details
visibility
public
final
false
static
true

getFilters

getFilters( ) : array

Get all the filters

Output
array
Details
visibility
public
final
false
static
false

hasDefaultNamespaces

hasDefaultNamespaces( ) : boolean

Returns true when defaultNamespaces are set

Output
boolean
Details
visibility
public
final
false
static
true

prependFilter

prependFilter( Zend_Filter_Interface $filter ) : Zend_Filter

Add a filter to the start of the chain

Arguments
$filter
Zend_Filter_Interface
Output
Zend_Filter
Provides a fluent interface
Details
visibility
public
final
false
static
false

setDefaultNamespaces

setDefaultNamespaces( array|string $namespace ) : null

Sets new default namespaces

Arguments
$namespace
arraystring
Output
null
Details
visibility
public
final
false
static
true
Documentation was generated by DocBlox.