/** * Prepare filter values , clean empty filters * @param array $filters * @return array */ protected function _cleanFilters(array $filters) { foreach ($filters as $field => $val) { if (!$val instanceof Db_Select_Filter && !is_null($val) && (!is_array($val) && !strlen((string) $val))) { unset($filters[$field]); continue; } if ($this->_objectConfig->fieldExists($field) && $this->_objectConfig->isBoolean($field)) { $filters[$field] = Filter::filterValue(Filter::FILTER_BOOLEAN, $val); } } return $filters; }
/** * Check if the object field exists * @param string $name * @return boolean */ public function fieldExists($name) { return $this->_config->fieldExists($name); }