Public Member Functions | |
addFilter (Zend_Filter_Interface $filter, $column='') | |
filter ($object) | |
Protected Attributes | |
$_columnFilters = array() |
Definition at line 28 of file Object.php.
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 }
$_columnFilters = array() [protected] |
Definition at line 30 of file Object.php.