Example #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->db = Instance::ensure($this->db, Connection::className());
 }
Example #2
0
 /**
  * @return Storage storage instance.
  */
 public function getStorage()
 {
     if (!is_object($this->_storage)) {
         $this->_storage = Instance::ensure($this->_storage, Storage::className());
     }
     return $this->_storage;
 }