/** * Initializes the application component. * This method overrides the parent implementation by establishing the database connection. */ public function init() { parent::init(); $this->db = Instance::ensure($this->db, Connection::className()); $this->db->getCollection($this->itemTable)->createIndex(['name' => 1], ['unique' => true]); $this->db->getCollection($this->ruleTable)->createIndex(['name' => 1], ['unique' => true]); }
/** * Initializes the application component. * This method overrides the parent implementation by establishing the database connection. */ public function init() { parent::init(); $this->db = Instance::ensure($this->db, Connection::className()); }
/** * Initializes the application component. * This method overrides parent implementation by loading the authorization data * from PHP script. */ public function init() { parent::init(); $this->itemFile = Yii::getAlias($this->itemFile); $this->assignmentFile = Yii::getAlias($this->assignmentFile); $this->ruleFile = Yii::getAlias($this->ruleFile); $this->load(); }
/** * Initializes the application component. * This method overrides the parent implementation by establishing the database connection. */ 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 parent implementation by loading the authorization data * from PHP script. */ public function init() { parent::init(); $this->db = Instance::ensure($this->db, Connection::className()); if ($this->enableCaching) { $this->cache = Instance::ensure($this->cache, Cache::className()); } else { $this->cache = null; } }
/** * Initializes the application component. * This method overrides parent implementation by loading the authorization data * from PHP script. */ public function init() { parent::init(); $this->authFile = Yii::getAlias($this->authFile); $this->load(); }