Get instantiator.

@return \Berlioz\ServiceContainer\Instantiator
@throws \Berlioz\ServiceContainer\Exception\ContainerException
197978
public function getInstantiator(): Instantiator
    {
        if (is_null($this->instantiator)) {
            $this->setInstantiator(new Instantiator(null, $this));
        }

        return $this->instantiator;
    }
674952
public function getInflector()
    {
        if (!isset($this->inflector)) {
            $this->inflector = new ClassNameInflector($this->getNamespace());
        }

        return $this->inflector;
    }
883362
protected function Container()
    {
        if (!$this->container) {
            $this->container = new Container(Request::GetData('container'));
        }
        return $this->container;
    }
1212387
protected function getServiceManager()
    {
        try {
            $serviceManager = $this->getOriginalServiceManager();
        } catch (InvalidServiceManagerException $e) {
            $serviceManager = ServiceManager::getServiceManager();
        }
        return $serviceManager;
    }
521181
protected function getMockerContainer()
    {
        if ($this->isKernelDriverUsed()) {
            $container = $this->kernel->getContainer();

            if (!$container instanceof MockerContainer) {
                throw new \LogicException('Container is not able to mock the services');
            }

            return $container;
        }

        throw new \LogicException('Session has no access to client container');
    }
556272
final public function get($id)
    {
        $allowParent = !$this->defaults->getChanges() && empty($this->instanceof);
        $definition = $this->container->getDefinition($id);

        return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, array());
    }
136652
private function getContainer()
    {
        if (null === $this->container && null !== $this->application) {
            $this->container = $this->application->getContainer();
        }

        return $this->container;
    }
794992
protected function makeNewContainer()
    {
        $container = new Container();
        $container->classSet($this->entityClass);
        $container->setPropertyMapper( PropertyMapperEntityData::class );
        return $container;
    }
457798
public function get($serviceId)
    {
        if (isset($this->services[$serviceId])) {
            return $this->services[$serviceId];
        }

        if (!isset($this->instantiators[$serviceId])) {
            throw new \InvalidArgumentException(sprintf(
                'No instantiator has been registered for requested service "%s"',
                $serviceId
            ));
        }

        $this->services[$serviceId] = $this->instantiators[$serviceId]($this);

        return $this->services[$serviceId];
    }
1089620
private function getNettePresenterFactory(): Nette\DI\Definitions\ServiceDefinition
    {
        $applicationExtension = $this->compiler->getExtensions(Nette\Bridges\ApplicationDI\ApplicationExtension::class);
        if ($applicationExtension === []) {
            throw new \LogicException('ApplicationExtension not found, did you register it in your configuration?');
        }

        $container = $this->getContainerBuilder();
        $presenterFactory = reset($applicationExtension)->prefix('presenterFactory');
        if (!$container->hasDefinition($presenterFactory)) {
            throw new \LogicException('PresenterFactory service from ApplicationExtension not found. Make sure ApplicationExtension is loaded before PresenterMappingExtension.');
        }

        /** @var Nette\DI\Definitions\ServiceDefinition $serviceDefinition */
        $serviceDefinition = $container->getDefinition($presenterFactory);

        return $serviceDefinition;
    }
812653
private static function getInstance()
	{
		$accessor = static::getContainerAccessor();

		if (!isset(static::$instances[$accessor])) {
			$container = static::getContainer();
			static::$instances[$accessor] = $container[$accessor];
		}

		return static::$instances[$accessor];
	}
886497
public function getContainer(): Container
    {
        if ($this->containerInstance === null) {
            $this->containerInstance = $this->getCollector()->getContracts();
        }

        return $this->containerInstance;
    }
54822
public static function getContainer($zendServiceManager = null)
    {
        if (!self::$container) {
            self::$container = new SymfonyContainerWithZFFallback();
        }

        if (!Module::$zendServiceManager && $zendServiceManager) {
            if ($zendServiceManager->has('serviceLocator')) {
                $zendServiceManager = $zendServiceManager->get('serviceLocator');
            }
            Module::$zendServiceManager = $zendServiceManager;
        }

        return self::$container;
    }
815355
public function getContainer()
    {
        $mutex = new Mutex($this->file . '.lock', true);

        $ret = $mutex->run(
            function () {
                if ($this->needsRecompile()) {
                    file_put_contents($this->file, $this->compileContainerCode());
                }
                return include $this->file;
            }
        );

        if (!($ret instanceof Container)) {
            throw new \LogicException("The container must be returned by the compiler");
        }
        foreach ($this->plugins as $plugin) {
            $ret->addPlugin($plugin);
        }
        return $ret;
    }
253031
public function getRequestHandler()
    {
        if (isset($this->requestHandler))
            return $this->requestHandler;

        // now instantiating handler from config
        $handlerClass = "\\" . ltrim($this->handlerClass, "\\");
        if (!class_exists($handlerClass))
            throw new RuntimeException("Unable to create HTTP Handler instance with class: " . var_export($handlerClass, true));

        $this->requestHandler = new $handlerClass();
        return $this->requestHandler;
    }
188071
public static function getContainer()
    {
        if (!(self::$container instanceof Container)) {
            self::$container = new Container();
            self::$container->load();
        }

        return self::$container;
    }
344489
public static function getInstance()
    {
        if (null === self::$instance) {
            $class          = new \ReflectionClass(__CLASS__);
            self::$instance = $class->newInstanceArgs(func_get_args());
        }

        return self::$instance;
    }