Varien_Filter_Object Class Reference

Inheritance diagram for Varien_Filter_Object:

Mage_Adminhtml_Block_Widget_Grid_Block Varien_Filter_Object_Grid

List of all members.

Public Member Functions

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

Protected Attributes

 $_columnFilters = array()


Detailed Description

Definition at line 28 of file Object.php.


Member Function Documentation

addFilter ( Zend_Filter_Interface $  filter,
column = '' 
)

Definition at line 32 of file Object.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 ( object  ) 

Reimplemented in Varien_Filter_Object_Grid.

Definition at line 44 of file Object.php.

00045     {
00046         if (!$object instanceof Varien_Object) {
00047             throw new Exception('Expecting an instance of Varien_Object');
00048         }
00049         $class = get_class($object);
00050         $out = new $class;
00051         foreach ($object->getData() as $column=>$value) {
00052             $value = parent::filter($value);
00053             if (isset($this->_columnFilters[$column])) {
00054                 $value = $this->_columnFilters[$column]->filter($value);
00055             }
00056             $out->setData($column, $value);
00057         }
00058         return $out;
00059     }


Member Data Documentation

$_columnFilters = array() [protected]

Definition at line 30 of file Object.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