public function invoke(array $params = null, array $posts = null) { $this->attributes->invoke(); $this->controller->attributes->invoke(); $args = Argument::createArgs($this->attributes, $this->parameters, $params, $posts); // foreach ($this->parameters as $parameter) { // var_dump($parameter->getClass()); // if (array_key_exists($parameter->name, $params)) { // $args[$parameter->name] = $params[$parameter->name]; // } else { // $args[$parameter->name] = null; // } // } return $this->reflector->invokeArgs($this->controller, $args); }