yii\web\CacheSession::init PHP Method

init() public method

Initializes the application component.
public init ( )
    public function init()
    {
        parent::init();
        $this->cache = Instance::ensure($this->cache, Cache::className());
    }

Usage Example

 /**
  * Initializes the application component.
  */
 public function init()
 {
     parent::init();
     if (!$this->cache instanceof HSCache) {
         throw new InvalidConfigException('Cache component for session must be instance of ' . HSCache::className());
     }
     $this->cache = clone $this->cache;
     $this->cache->group = $this->group;
 }
All Usage Examples Of yii\web\CacheSession::init