Пример #1
0
 /**
  * Invoke method
  *
  * @param array $params
  * @param Filter $filter
  *
  * @return mixed
  * @throws \Koda\Error\TypeCastingException
  */
 public function invoke(array $params, Filter $filter = null)
 {
     if (!$filter) {
         $filter = \Koda::getFilter($this->name);
     }
     $args = $this->filterArgs($params, $filter);
     return call_user_func_array([$filter->context ?: $this->class, $this->method], $args);
 }