/** * @inheritdoc * * Creates the default cache component if it is not provided. */ public function init() { parent::init(); $this->controllerNamespace = 'jlorente\\captcha'; $this->setAliases(['@captchaRoute' => '/' . $this->getUniqueId() . '/captcha/index']); if (empty($this->cache)) { $this->setCache(['class' => ApcCache::className(), 'keyPrefix' => 'captcha_']); } if (empty($this->captchaAction)) { $this->captchaAction = ['class' => CaptchaAction::className(), 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null]; } }