Добавлен API вызов для получения активного Recaptcha public key

This commit is contained in:
ErickSkrauch
2016-08-03 15:58:12 +03:00
parent c2986445f1
commit 5e40ccbe49
7 changed files with 85 additions and 2 deletions

View File

@@ -5,11 +5,17 @@ use yii\base\InvalidConfigException;
class Component extends \yii\base\Component {
public $public;
public $secret;
public function init() {
if ($this->secret === NULL) {
throw new InvalidConfigException('');
if ($this->public === null) {
throw new InvalidConfigException('Public is required');
}
if ($this->secret === null) {
throw new InvalidConfigException('Secret is required');
}
}