protected function getArguments($presenter)
    {
        if (is_array($presenter)) {
            $r = new \ReflectionMethod($presenter[0], $presenter[1]);
        } elseif (is_object($presenter) && !$presenter instanceof \Closure) {
            $r = new \ReflectionObject($presenter);
            $r = $r->getMethod('__invoke');
        } else {
            $r = new \ReflectionFunction($presenter);
        }

        return $this->doGetArguments($presenter, $r->getParameters());
    }