@@ -62,7 +62,7 @@ class Cache extends \yii\caching\Cache
{
parent::init();
if(is_string($this->db)){
$this->db=Yii::$app->getComponent($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.");
@@ -56,7 +56,7 @@ class Session extends \yii\web\Session
publicfunctioninit()
{
if(is_string($this->db)){
$this->db=Yii::$app->getComponent($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.");