Filter.php

Show: PublicProtectedPrivateinherited
Table of Contents
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.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Filter  
Version
$Id$  

\Zend_Filter

Package: Zend_Filter
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  CHAIN_APPEND = 'append'
>VConstant  CHAIN_PREPEND = 'prepend'

Properties

>VPropertyprotectedarray $_defaultNamespaces = array()
static
Default Namespaces
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_filters = array()
Filter chain
Default valuearray()Details
Type
array

Methods

methodpublicaddDefaultNamespaces(array | string $namespace) : null
static

Adds a new default namespace

Parameters
NameTypeDescription
$namespacearray | string
Returns
TypeDescription
null
methodpublicaddFilter(\Zend_Filter_Interface $filter, string $placement = self::CHAIN_APPEND) : \Zend_Filter

Adds a filter to the chain

Parameters
NameTypeDescription
$filter\Zend_Filter_Interface
$placementstring
Returns
TypeDescription
\Zend_FilterProvides a fluent interface
methodpublicappendFilter(\Zend_Filter_Interface $filter) : \Zend_Filter

Add a filter to the end of the chain

Parameters
NameTypeDescription
$filter\Zend_Filter_Interface
Returns
TypeDescription
\Zend_FilterProvides a fluent interface
methodpublicfilter(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)
Parameters
NameTypeDescription
$valuemixed
Returns
TypeDescription
mixed
methodpublicfilterStatic(mixed $value, string $classBaseName, array $args = array(), array | string $namespaces = array()) : mixed
static

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.
Parameters
NameTypeDescription
$valuemixed
$classBaseNamestring
$argsarray

OPTIONAL

$namespacesarray | string

OPTIONAL

Returns
TypeDescription
mixed
Throws
ExceptionDescription
\Zend_Filter_Exception
methodpublicget(mixed $value, string $classBaseName, array $args = array(), array | string $namespaces = array()) : mixed
static

Parameters
NameTypeDescription
$valuemixed
$classBaseNamestring
$argsarray

OPTIONAL

$namespacesarray | string

OPTIONAL

Returns
TypeDescription
mixed
Throws
ExceptionDescription
\Zend_Filter_Exception
Details
Deprecated
 
See
 
methodpublicgetDefaultNamespaces() : array
static

Returns the set default namespaces

Returns
TypeDescription
array
methodpublicgetFilters() : array

Get all the filters

Returns
TypeDescription
array
methodpublichasDefaultNamespaces() : boolean
static

Returns true when defaultNamespaces are set

Returns
TypeDescription
boolean
methodpublicprependFilter(\Zend_Filter_Interface $filter) : \Zend_Filter

Add a filter to the start of the chain

Parameters
NameTypeDescription
$filter\Zend_Filter_Interface
Returns
TypeDescription
\Zend_FilterProvides a fluent interface
methodpublicsetDefaultNamespaces(array | string $namespace) : null
static

Sets new default namespaces

Parameters
NameTypeDescription
$namespacearray | string
Returns
TypeDescription
null
Documentation was generated by phpDocumentor 2.2.0 .