@param Container $pimple

@return Container
504070
private function setupDefaultOptions(Container $pimple)
    {
        // Options
        $pimple['http_client.config']  = [];
        $pimple['http_client.yaml']    = null;
        $pimple['http_client.logger']  = null;
        $pimple['http_client.sender']  = null;
        $pimple['http_client.guzzle']  = null;
        $pimple['http_client.factory'] = null;
        $pimple['http_client.debug']   = null;

        return $pimple;
    }
630073
public function process(Pimple $container, array $options)
    {
        $container['logger'] = $container->share(
          function () {
              return new NullLogger();
          }
        );

        $container['log_level'] = LogLevel::INFO;

        $container['log_sub_request'] = false;

        foreach ($options as $name => $value) {
            $container[$name] = $value;
        }

        return $container;
    }
864340
public function register(Container $pimple)
    {
        $pimple['material'] = function ($pimple) {
            return new Material($pimple['access_token']);
        };

        $temporary = function ($pimple) {
            return new Temporary($pimple['access_token']);
        };

        $pimple['material_temporary'] = $temporary;
        $pimple['material.temporary'] = $temporary;
    }
139559
protected function addZedRequestClient(Container $container): Container
    {
        $container[static::CLIENT_ZED_REQUEST] = function (Container $container) {
            return new CompaniesRestApiToZedRequestClientBridge($container->getLocator()->zedRequest()->client());
        };

        return $container;
    }
1877
public function providePersistenceLayerDependencies(Container $container): Container
    {
        $container = parent::providePersistenceLayerDependencies($container);
        $container = $this->addProductListPropelQuery($container);

        return $container;
    }
1244446
public function register(Container $pimple)
    {
        $pimple['js'] = function ($pimple) {
            $js = new Js($pimple['access_token']);
            $js->setCache($pimple['cache']);

            return $js;
        };

        $contact = function ($pimple) {
            $js = new Contact($pimple['access_token']);
            $js->setCache($pimple['cache']);

            return $js;
        };

        $pimple['js_contact'] = $contact;
        $pimple['js.contact'] = $contact;
    }
1077579
public function newContainer()
    {
        $refl = new ReflectionClass($this);
        $container = $refl->newInstanceArgs(func_get_args());
        $container->classSet($this->class);
        $container->propertyMapper = $this->propertyMapper;
        return $container;
    }
459876
public function register(PimpleContainer $app)
    {
        $app['capsule.connection_defaults'] = [
            'driver' => 'mysql',
            'host' => 'localhost',
            'database' => null,
            'username' => 'root',
            'password' => null,
            'charset' => 'utf8',
            'collation' => 'utf8_unicode_ci',
            'prefix' => null,
            'logging' => false,
        ];

        $app['capsule.container'] = function () {
            return new Container();
        };

        $app['capsule.dispatcher'] = function () use ($app) {
            return new Dispatcher($app['capsule.container']);
        };

        if (class_exists('Illuminate\Cache\CacheManager')) {
            $app['capsule.cache_manager'] = function () use ($app) {
                return new CacheManager($app['capsule.container']);
            };
        }

        $app['capsule.eloquent'] = true;

        $app['capsule'] = function ($app) {
            $capsule = new DB($app['capsule.container']);
            $capsule->setEventDispatcher($app['capsule.dispatcher']);

            if (isset($app['capsule.cache_manager']) && isset($app['capsule.cache'])) {
                $capsule->setCacheManager($app['capsule.cache_manager']);

                foreach ($app['capsule.cache'] as $key => $value) {
                    $app['capsule.container']->offsetGet('config')->offsetSet('cache.'.$key, $value);
                }
            }

            if (!isset($app['capsule.connections'])) {
                $app['capsule.connections'] = [
                    'default' => (isset($app['capsule.connection']) ? $app['capsule.connection'] : []),
                ];
            }

            foreach ($app['capsule.connections'] as $connection => $options) {
                $options = array_replace($app['capsule.connection_defaults'], $options);
                $logging = $options['logging'];
                unset($options['logging']);

                $capsule->addConnection($options, $connection);

                if ($logging) {
                    $capsule->getConnection($connection)->enableQueryLog();
                } else {
                    $capsule->getConnection($connection)->disableQueryLog();
                }
            }

            $capsule->bootEloquent();
            $capsule->setAsGlobal();

            $app['db'] = $app->factory(function ($c) {
                return DB::connection();
            });

            return $capsule;
        };
    }
92499
protected function addCompanyFacade(Container $container): Container
    {
        $container[static::FACADE_COMPANY] = function (Container $container) {
            return new CompaniesRestApiToCompanyFacadeBridge(
                $container->getLocator()->company()->facade()
            );
        };

        return $container;
    }
882910
public function register(\Pimple $mainContainer)
    {
        $mainContainer['core']['db'] = $mainContainer->share(function () {
            return \Pelican_Db::getInstance();
        });




        $mainContainer['core']['listener.ajax_response_render'] = $mainContainer->share(function () {
            return new AjaxRenderResponseListener(
                new \Pelican_Ajax_Adapter_Jquery()
            );
        });
    }
335003
public function register(\Pimple\Container $container)
    {
        $this->define();
        foreach ($this->hooks as $hookName => $hookDef) {
            $hook = $container["newHook.factory"];
            $hook->create($hookName, $hookDef);
            $container["hooks.service"]->addHook($hook);
        }
    }
519985
public function register(Container $pimple)
    {
        $pimple['user'] = function ($pimple) {
            return new User($pimple['access_token']);
        };

        $department = function ($pimple) {
            return new Department($pimple['access_token']);
        };

        $tag = function ($pimple) {
            return new Tag($pimple['access_token']);
        };

        $batch = function ($pimple) {
            return new Batch($pimple['access_token']);
        };

        $pimple['department'] = $department;
        $pimple['party'] = $department;

        $pimple['user_party'] = $department;
        $pimple['user.party'] = $department;

        $pimple['user_department'] = $department;
        $pimple['user.department'] = $department;

        $pimple['tag'] = $tag;

        $pimple['user_tag'] = $tag;
        $pimple['user.tag'] = $tag;

        $pimple['user_batch'] = $batch;
        $pimple['user.batch'] = $batch;
    }
103152
public function register(Container $pimple)
    {
        $pimple['oauth'] = function ($pimple) {
            $callback = $this->prepareCallbackUrl($pimple);
            $scopes = $pimple['config']->get('oauth.scopes', []);
            $socialite = new WeChatProvider(
                $pimple['request'],
                $pimple['open_platform_config']['app_id'],
                $pimple['open_platform']->getAccessToken(),
                $pimple['config']['app_id'],
                $pimple['config']['secret'],
                $callback
            );

            if (!empty($scopes)) {
                $socialite->scopes($scopes);
            }

            return $socialite;
        };
    }
43480
public function container($container = 'default')
	{
		if (!isset($this->containers[$container])) {
			$this->containers[$container] = new Container($container);
		}
		
		return $this->containers[$container];
	}
587039
public static function getContainer() : ?ContainerInterface
    {
        if (is_null(self::$container)) {
            self::setContainer(self::getDefaultContainer());
        }

        return self::$container;
    }
1271447
public function container(string $containerClass = Container::class): ContainerInterface
    {
        if (($source = $this->getDefinitionSource()) instanceof MutableDefinitionSource) {
            return new $containerClass($source, $this->getProxyFactory(), $this->getWrapperContainer());
        }
        return $source;
    }
630129
public function setContainer(Container $container)
    {
        $pipeline = $this->pipeline;

        $closure = function () use ($container) {
            $this->container = $container;
        };

        $resetPipeline = $closure->bindTo($pipeline, $pipeline);
        $resetPipeline();

        return $this;
    }