コード例 #1
0
ファイル: StorageMongoDb.php プロジェクト: yii2tech/config
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->db = Instance::ensure($this->db, Connection::className());
 }
コード例 #2
0
ファイル: Manager.php プロジェクト: heartshare/config
 /**
  * @return Storage storage instance.
  */
 public function getStorage()
 {
     if (!is_object($this->_storage)) {
         $this->_storage = Instance::ensure($this->_storage, Storage::className());
     }
     return $this->_storage;
 }