public function init() { if (is_string($this->db)) { $this->db = Yii::$app->get($this->db); } if (!$this->db instanceof Connection) { throw new InvalidConfigException("DbSession::db must be either a DB connection instance or the application component ID of a DB connection."); } if (!$this->sessionTable) { $this->sessionTable = $this->db->tablePrefix . 'session'; } parent::init(); }
/** * @inheritdoc */ public function init() { parent::init(); $this->createTable(); }