public function init()
    {
        parent::init();
        $this->db = Instance::ensure($this->db, Connection::className());
        if ($this->cache !== null) {
            $this->cache = Instance::ensure($this->cache, Cache::className());
        }
    }
public function init()
    {
        parent::init();
        $this->db = Instance::ensure($this->db, Connection::className());
        if ($this->cache !== null) {
            $this->cache = Instance::ensure($this->cache, Cache::className());
        }
    }
public function init ( ) { parent :: init ( ) ; $ this -> db = Instance :: ensure ( $ this -> db , Connection :: className ( ) ) ; if ( $ this -> cache !== null ) { $ this -> cache = Instance :: ensure ( $ this -> cache , Cache :: className ( ) ) ; } }
Initializes the application component.
This method overrides the parent implementation by establishing the MongoDB connection.
Initializes the application component . This method overrides the parent implementation by establishing the MongoDB connection .