Get resolver instance.

@return object
333211
protected function resolver()
    {
        $table = Arr::get($this->config, 'table', $this->name);

        return $this->repository->table($table);
    }
1286238
public function getInstance()
    {
        if (!$this->parserInstance) {
            /**
             * Check if Twig_Autoloader class exists
             * otherwise include it.
             */
        
            if (!class_exists('\Twig_Autoloader')) {
                require_once $this->parserDirectory . '/Autoloader.php';
            }

            \Twig_Autoloader::register();
            $loader = new \Twig_Loader_Filesystem($this->getTemplateDirs());
            $this->parserInstance = new \Twig_Environment(
                $loader,
                $this->parserOptions
            );

            foreach ($this->parserExtensions as $ext) {
                $extension = is_object($ext) ? $ext : new $ext;
                $this->parserInstance->addExtension($extension);
            }
        }

        return $this->parserInstance;
    }
353704
public function createResolver()
    {
        $resolver = $this->getResolver();
        if (isset($resolver)) {
            $resolver_class = get_class($resolver);

        // Create new retriever.
        $retriever = $resolver->getUriRetriever();
            if (isset($retriever)) {
                $retriever_class = get_class($retriever);
                $new_retriever = new $retriever_class();
            } else {
                $new_retriever = new UriRetriever();
            }

        // Store max depth before init since maxDepth is set on the parent.
        $max_depth = $resolver::$maxDepth;

        // Create new resolver.
        $new_resolver = new $resolver_class($new_retriever);

        // Sync public static properties.
        $new_resolver::$maxDepth = $max_depth;
        } else {
            $new_retriever = new UriRetriever();
            $new_resolver = new RefResolver($new_retriever);
        }

        return $new_resolver;
    }
566982
protected function getResolver(string $key): ?ResolverInterface
    {
        foreach ($this->getResolvers() as $resolver) {
            if ($resolver->hasService($key) === true) {
                return $resolver;
            }
        }

        return null;
    }
140929
public function getResolver()
    {
        if ($this->resolver === null) {
            $config = $this->getConfig('resolver');
            if ($config !== null) {
                $this->resolver = $this->buildResolver($config);
            } else {
                throw new RuntimeException('Resolver has not been set.');
            }
        }

        return $this->resolver;
    }
707174
private function getResolver(): OptionsResolver
    {
        if (!is_null($this->resolver)) {
            return $this->resolver;
        }

        $this->resolver = $this->buildResolver();

        return $this->resolver;
    }
1167655
public function getRouter() : RouterInterface
    {
        if (! $this->router instanceof RouterInterface) {
            $router = new Router();
            $resolver = $this->getCallbackResolver();
            if ($resolver instanceof CallbackResolverInterface) {
                $router->setCallbackResolver($resolver);
            }

            $routerCacheFile = $this->getConfiguration('routerCacheFile', false);
            if ($routerCacheFile) {
                $router->setCacheFile($routerCacheFile);
            }

            $this->router = $router;
        }

        return $this->router;
    }
995710
public static function instance(): self
    {
        if (!self::$instance) {
            self::$instance = new self(
                1,
                Sequencer::sequence('exporter-object-id'),
                InvocableInspector::instance()
            );
        }

        return self::$instance;
    }
738703
public static function fromInvalidResolver($resolver) : self
    {
        return new self(sprintf(
            'Invalid resolver found, expected `' . ResolverInterface::class . '`, `%s` given.',
            is_object($resolver) ? get_class($resolver) : gettype($resolver)
        ));
    }
197978
public function getInstantiator(): Instantiator
    {
        if (is_null($this->instantiator)) {
            $this->setInstantiator(new Instantiator(null, $this));
        }

        return $this->instantiator;
    }
206058
private function buildResolver(): OptionsResolver
    {
        $resolver = new OptionsResolver();
        $profile = $this->mapOfProfiles->get($this->currentProfile);

        call_user_func($profile, $resolver);

        return $resolver;
    }
206916
protected function resolveCallable($callable)
    {
        if (!$this->container instanceof ContainerInterface) {
            return $callable;
        }

        /** @var CallableResolverInterface $resolver */
        $resolver = $this->container->get('callableResolver');

        return $resolver->resolve($callable);
    }
665700
protected function getPayloadResolver(ExecutorInterface $executor)
    {
        $key = $executor->getName();

        if (!array_key_exists($key, $this->resolvers)) {
            $resolver = new OptionsResolver();
            $executor->configurePayload($resolver);

            $this->resolvers[$key] = $resolver;
        }

        return $this->resolvers[$key];
    }
995987
public function getResolver(Factory $factory = null)
    {
        if ($this->resolver instanceof Resolver) {
            $this->logDebug('Existing Resolver found using it');
            return $this->resolver;
        }

        if ($factory === null) {
            $factory = new Factory();
        }

        $this->logDebug('Creating new Resolver');
        $this->resolver = $factory->createCached($this->dnsServer, $this->loop);

        return $this->resolver;
    }
133053
protected function getTransformer()
    {
        if (is_callable($this->transformer) || $this->transformer instanceof TransformerAbstract) {
            return $this->transformer;
        }

        return Craft::createObject($this->transformer);
    }
151310
public function getRouter()
    {
        if (is_null($this->router)) {
            if (method_exists($this, 'resolve')) {
                $this->setRouter($this->resolve(Router::class));
            } else {
                $this->setRouter(new Router());
            }
        }

        return $this->router;
    }
1173954
protected function getConfigResolver()
    {
        if (is_null($this->configResolver) === false) {
            return $this->configResolver;
        }

        $resolver = new AttributesResolver();
        $resolver->setDefault('host', '0.0.0.0', 'string', true)
            ->setDefault('port', 4000, 'integer', true)
            ->setValidator('port', function ($value) {
                return $value >= 0;
            })
            ->setDefault('server_watch_ext', ['html'], 'array', true)
            ->setDefault('parsedown_activated', false, 'bool', true);

        $this->configResolver = $resolver;

        return $this->configResolver;
    }