Example #1
0
 public function init()
 {
     parent::init();
     if (is_string($this->cacheProvider)) {
         $this->cacheProvider = Yii::$app->{$this->cacheProvider};
     }
     if (!$this->cacheProvider instanceof Cache) {
         throw new InvalidConfigException('Invalid `cacheKey` parameter was specified.');
     }
 }
Example #2
0
 public function init()
 {
     parent::init();
     $this->translation = new Translation();
 }