/** * Initializes this component by ensuring the existence of the cache path. */ public function init() { parent::init(); $this->cachePath = Leaps::getAlias($this->cachePath); if (!is_dir($this->cachePath)) { FileHelper::createDirectory($this->cachePath, $this->dirMode, true); } }
/** * Initializes the DbCache component. * This method will initialize the [[db]] property to make sure it refers to a valid DB connection. * @throws InvalidConfigException if [[db]] is invalid. */ public function init() { parent::init(); $this->db = Instance::ensure($this->db, Connection::className()); }
/** * Initializes this application component. * It creates the memcache instance and adds memcache servers. */ public function init() { parent::init(); $this->addServers($this->getMemcache(), $this->getServers()); }