/** * Initializes the application component. * This method overrides parent implementation by loading the authorization data * from PHP script. */ public function init() { parent::init(); if ($this->authFile === null) { $this->authFile = Yii::getPathOfAlias('application.data.auth') . '.php'; } $this->load(); }
/** * 是否存在默认角色 * @return boolean */ public function existDefaultRole() { $ret_code = FALSE; $default_role = $this->auth->getAuthItem(Yii::app()->params['defaultrole']); if (is_object($default_role) && CAuthItem::TYPE_ROLE == $default_role->type) { $ret_code = TRUE; } return $ret_code; }
/** * Initializes the application component. * This method overrides the parent implementation by establishing the database connection. */ public function init() { $this->tablePrefix = Yii::app()->getDb()->tablePrefix; if ($this->tablePrefix != '') { $this->itemTable = $this->tablePrefix . $this->itemTable; $this->itemChildTable = $this->tablePrefix . $this->itemChildTable; $this->assignmentTable = $this->tablePrefix . $this->assignmentTable; } parent::init(); $this->_usingSqlite = !strncmp($this->getDbConnection()->getDriverName(), 'sqlite', 6); }
/** * Initializes the application component. * This method overrides the parent implementation by establishing the database connection. */ public function init() { parent::init(); $this->_usingSqlite = !strncmp($this->getDbConnection()->getDriverName(), 'sqlite', 6); }
public function init() { parent::init(); $this->getDbConnection(); // para inicializar db }
/** * {@inheritDoc} * @see CAuthManager::executeBizRule() */ public function executeBizRule($bizRule, $params, $data) { return parent::executeBizRule($bizRule, $params, $data); }