@param \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface $container

@return \Xervice\Core\Business\Model\Dependency\DependencyContainerInterface
340977
private function addDockerFacade(DependencyContainerInterface $container): DependencyContainerInterface
    {
        $container[self::DOCKER_FACADE] = function(DependencyContainerInterface $container) {
            return $container->getLocator()->dockerClient()->facade();
        };

        return $container;
    }
1154437
public function pathResolvable(Container $container)
    {
        $event = $this->loadEventFromPath($container);
        return ($event instanceof EventInterface) && $event->id();
    }
29573
public function register(ContainerInterface $container)
    {
        if (! isset($container['session'])) {
            $container['session'] = function (ContainerInterface $container) {
                return new Session;
            };
        }

        if (! isset($container['router'])) {
            /**
             * This service MUST return a SHARED instance
             * of Mbh\Interfaces\RouterInterface.
             *
             * @param Container $container
             * @return RouterInterface
             */
            $container['router'] = function (ContainerInterface $container) {
                $routerCacheFile = false;
                if (isset($container->get('settings')['routerCacheFile'])) {
                    $routerCacheFile = $container->get('settings')['routerCacheFile'];
                }

                $router = (new Router)->setCacheFile($routerCacheFile);
                if (method_exists($router, 'setContainer')) {
                    $router->setContainer($container);
                }

                if (method_exists($router, 'setCallableResolver')) {
                    $router->setCallableResolver($container['callableResolver']);
                }

                return $router;
            };
        }
    }
599664
public static function configureContainer(LimoncelloContainerInterface $container): void
    {
        $container[CookieJarInterface::class] =
            function (PsrContainerInterface $container): CookieJarInterface {
                $settings = $container->get(SettingsProviderInterface::class)->get(CookieSettings::class);

                return new CookieJar(
                    $settings[CookieSettings::KEY_DEFAULT_PATH],
                    $settings[CookieSettings::KEY_DEFAULT_DOMAIN],
                    $settings[CookieSettings::KEY_DEFAULT_IS_SEND_ONLY_OVER_SECURE_CONNECTION],
                    $settings[CookieSettings::KEY_DEFAULT_IS_ACCESSIBLE_ONLY_THROUGH_HTTP],
                    $settings[CookieSettings::KEY_DEFAULT_IS_RAW]
                );
            };

        $container[CookieFunctionsInterface::class] =
            function (PsrContainerInterface $container): CookieFunctionsInterface {
                return new CookieFunctions();
            };
    }
553420
public static function configureContainer(LimoncelloContainerInterface $container): void
    {
        $storage = null;
        $factory = function (PsrContainerInterface $container) use (&$storage) {
            if ($storage === null) {
                $storage = static::createStorage($container);
            }

            return $storage;
        };

        $container[CsrfTokenGeneratorInterface::class] = $factory;
        $container[CsrfTokenStorageInterface::class]   = $factory;
    }
1365060
private function getKernelContainerService(string $service): object
    {
        /** @var \Symfony\Component\DependencyInjection\ServiceLocator $serviceLocator */
        $serviceLocator = $this->container->get('service_bus.public_services_locator');

        /** @var object $object */
        $object = $serviceLocator->get($service);

        return $object;
    }
401561
public function resolveInjectable(Container $container, $class)
    {
        $id = $this->key === null ? $class : $this->key;

        if ($container->has($id)) {
            return $container->get($id, $this->new);
        }

        if (!class_exists($id)) {
            throw new DependencyResolutionException(
                sprintf('Class: "%s" not exists.', $id)
            );
        }

        return $container->newInstance($id);
    }
1242697
public static function factory(ContainerInterface $container)
    {
        $ob = new self(
            $container->get('Core/RepositoryService'),
            $container->get('Core/Navigation'),
            $container->get('forms'),
            $container->get('Applications/Options'),
            $container->get('Applications/Events'),
            $container->get('translator'),
            $container
        );
        return $ob;
    }
1148016
protected function addCommandList(
        DependencyContainerInterface $container
    ): DependencyContainerInterface {
        $container[self::COMMAND_LIST] = function (DependencyContainerInterface $container) {
            return $this->getCommandList();
        };

        return $container;
    }
765868
public function setContainer(Container $container = null)
    {
        $this->container = $container;
        $this->parameters = array();

        return $this;
    }
1251746
public function setContainer(ContainerInterface $container = null)
    {
        $this->abortIf(is_null($container), 'Requires DI container');

        $this->fs = $container->get('filesystem');
        $this->em = $container->get('doctrine.orm.entity_manager');
        $this->target = $container->getParameter('kernel.root_dir').'/../web/media/example/';
        $this->source = $container->get('kernel')->locateResource('@AnimeDbDevBundle/Resource/private/images/');
    }
331080
public static function inject(ContainerInterface $container, $entry)
    {
        if (! is_object($entry)) {
            return $entry;
        }

        if (! static::classUses($entry, ManageContainerTrait::class)
            && ! $entry instanceof ManageContainerInterface) {
            return $entry;
        }

        // set the container
        return $entry->setAppContainer($container);
    }
687556
public function createService(ServiceLocatorInterface $container)
    {
        // Retrieve the parent container when under zend-servicemanager v2
        if (method_exists($container, 'getServiceLocator')) {
            $container = $container->getServiceLocator() ?: $container;
        }

        return $this($container, ModuleOptions::class);
    }
1100781
private function addShellFacade(DependencyContainerInterface $container): DependencyContainerInterface
    {
        $container[self::SHELL_FACADE] = function (DependencyContainerInterface $container) {
            return $container->getLocator()->shell()->facade();
        };

        return $container;
    }
405325
public function get(ContainerInterface $container = null)
    {
        if (empty($this->arguments)) {
            $instance = new $this->class();
        } else {
            $ref = new \ReflectionClass($this->class);
            $instance = $ref->newInstanceArgs($this->prepare($container, $this->arguments));
        }

        return $this->executeMethods($instance, $container);
    }
649451
protected function prepare(ContainerInterface $container = null, array $arguments = [])
    {
        $result = [];

        foreach ($arguments as $k => $arg) {
            if (is_array($arg)) {
                $result[$k] = $this->prepare($container, $arg);
                continue;
            } elseif ($arg == '@Container') {
                $result[$k] = $container;
                continue;
            } elseif (strpos($arg, '@') !== 0) {
                $result[$k] = $arg;
                continue;
            }

            $arg = substr($arg, 1);

            if (!$container) {
                throw new ContainerException(sprintf('Unable to resolve dependency for "%s" - missing dependency "%s"', $this->class, $arg));
            }

            $result[$k] = $container->get($arg);
        }

        return $result;
    }
790584
public static function getInstance(Container $container = null)
    {
        if (null === self::$instance) {
            self::$instance = new Core($container);
        }
        return self::$instance;
    }