Mongolid\Manager::init PHP Method

init() protected method

Initializes the Mongolid manager.
protected init ( ) : void
return void
    protected function init()
    {
        if ($this->container) {
            return;
        }
        $this->container = new Container();
        $this->connectionPool = new Pool();
        $this->cacheComponent = new CacheComponent();
        $this->container->instance(Pool::class, $this->connectionPool);
        $this->container->instance(CacheComponentInterface::class, $this->cacheComponent);
        Ioc::setContainer($this->container);
        static::$singleton = $this;
    }