Esempio n. 1
0
 /**
  *
  */
 public function init()
 {
     parent::init();
     if (empty($this->storages)) {
         $this->storages = [['class' => SessionStorage::class], ['class' => DatabaseStorage::class]];
     }
     $this->storages = array_map(function ($storage) {
         return Instance::ensure($storage, Storage::class);
     }, $this->storages);
 }
Esempio n. 2
0
 /**
  *
  */
 public function init()
 {
     parent::init();
     $this->db = Instance::ensure($this->db, 'yii\\db\\Connection');
 }