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;
    }