Varien_Filter_Array Class Reference

Inheritance diagram for Varien_Filter_Array:

Varien_Filter_Array_Grid

List of all members.

Public Member Functions

 addFilter (Zend_Filter_Interface $filter, $column='')
 filter ($array)

Protected Attributes

 $_columnFilters = array()


Detailed Description

Definition at line 28 of file Array.php.


Member Function Documentation

addFilter ( Zend_Filter_Interface $  filter,
column = '' 
)

Definition at line 32 of file Array.php.

00033     {
00034         if (''===$column) {
00035             parent::addFilter($filter);
00036         } else {
00037             if (!isset($this->_columnFilters[$column])) {
00038                 $this->_columnFilters[$column] = new Zend_Filter();
00039             }
00040             $this->_columnFilters[$column]->addFilter($filter);
00041         }
00042     }

filter ( array  ) 

Reimplemented in Varien_Filter_Array_Grid.

Definition at line 44 of file Array.php.

00045     {
00046         $out = array();
00047         foreach ($array as $column=>$value) {
00048             $value = parent::filter($value);
00049             if (isset($this->_columnFilters[$column])) {
00050                 $value = $this->_columnFilters[$column]->filter($value);
00051             }
00052             $out[$column] = $value;
00053         }
00054         return $out;
00055     }


Member Data Documentation

$_columnFilters = array() [protected]

Definition at line 30 of file Array.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:25:02 2009 for Magento by  doxygen 1.5.8