/** * filter * * @param mixed $name * @param mixed $options * @access public * @return mixed */ public function filter($name, array $options = []) { if (static::EXT_FILTER === parent::filter($name, $options) and isset($this->filters[$name])) { $filter = new $this->filters[$name]($this, $options); $filter->run(); } }
/** * filter * * @param mixed $name * @param mixed $options * @access public * @return boolean|void */ public function filter($name, array $options = []) { if (static::EXT_FILTER === parent::filter($name, $options) and isset($this->filters[$name])) { $filter = new $this->filters[$name]($this, $options); $filterResults = $filter->run(); if (!empty($filterResults)) { $this->commands = array_merge($this->commands, (array) $filterResults); } } }