protected function getResolver()
    {
        if (! method_exists($this, 'resolve')) {
            return null;
        }

        $resolver = array($this, 'resolve');

        return function () use ($resolver) {
            $args = func_get_args();
            $result = call_user_func_array($resolver, $args);

            return $result;
        };
    }