protected function init($args) { parent::init($args); if (!isset($args['OAUTH_CONSUMER_KEY'], $args['OAUTH_CONSUMER_SECRET']) || strlen($args['OAUTH_CONSUMER_KEY']) == 0 || strlen($args['OAUTH_CONSUMER_SECRET']) == 0) { throw new KurogoConfigurationException("Twitter Consumer key and secret not set"); } }
protected function init($args) { parent::init($args); if (isset($args['GOOGLE_REQUIRE_LOGIN'])) { $this->requireLogin = $args['GOOGLE_REQUIRE_LOGIN']; } if (isset($args['OPENID_REALM'])) { if (!preg_match("@^https?://@", $args['OPENID_REALM'])) { throw new KurogoConfigurationException("Invalid OpenID realm {$args['OPENID_REALM']}. Realm must be a full url"); } $this->realm = $args['OPENID_REALM']; } if (isset($args['OAUTH_CONSUMER_KEY'], $args['OAUTH_CONSUMER_SECRET'])) { if (!isset($args['GOOGLE_SCOPE'])) { throw new KurogoConfigurationException("GOOGLE_SCOPE parameter must be specified"); } elseif (!is_array($args['GOOGLE_SCOPE'])) { throw new KurogoConfigurationException("GOOGLE_SCOPE parameter is not an array"); } $this->scope = $args['GOOGLE_SCOPE']; } }