filter, $field, $default); } public function setFilter($filter, $value = null) { if (is_array($filter)) { $this->filter = $filter; } elseif (is_string($filter)) { $this->filter[$filter] = $value; } else { trigger_error('Invalid filter argument type'); } return $this; } }