/** * @param array $contents * * @return \DreamFactory\Oasys\Configs\OAuthProviderConfig */ public function __construct($contents = array()) { Option::set($contents, 'type', static::OAUTH); parent::__construct($contents); }
/** * @param array $contents * * @throws \RuntimeException * @return \DreamFactory\Oasys\Configs\LegacyOAuthProviderConfig */ public function __construct($contents = array()) { // Require pecl oauth library... if (!extension_loaded('oauth')) { throw new \RuntimeException('Use of the LegacyOAuthProviderConfig requires the PECL "oauth" extension.'); } Option::set($contents, 'type', static::LEGACY_OAUTH); parent::__construct($contents); }