protected function resolve($action, $params)
    {
        if ($action instanceof Closure) {

            return $action($params);
        }

        list($controller, $method) = $action;

        $reflect = new ReflectionClass($controller);

        foreach (array_filter($reflect->getMethod($method)->getParameters(), $this->getParams()) as $param) {
            array_unshift($params, $this->registry->make(
                $param->getClass()->getName()
            ));
        }

        return $reflect->getMethod($method)->invokeArgs(
            $this->registry->make($controller),
            $params
        );
    }