thrownewInvalidConfigException($this->className()."::db must be either a MongoDB connection instance or the application component ID of a MongoDB connection.");
* Session extends [[\yii\web\Session]] by using MongoDB as session data storage.
* Session extends [[\yii\web\Session]] by using MongoDB as session data storage.
...
@@ -55,13 +56,8 @@ class Session extends \yii\web\Session
...
@@ -55,13 +56,8 @@ class Session extends \yii\web\Session
*/
*/
publicfunctioninit()
publicfunctioninit()
{
{
if(is_string($this->db)){
$this->db=Yii::$app->get($this->db);
}
if(!$this->dbinstanceofConnection){
thrownewInvalidConfigException($this->className()."::db must be either a MongoDB connection instance or the application component ID of a MongoDB connection.");