예제 #1
0
 /**
  * @param array $contents
  *
  * @return \DreamFactory\Oasys\Configs\OAuthProviderConfig
  */
 public function __construct($contents = array())
 {
     Option::set($contents, 'type', static::OAUTH);
     parent::__construct($contents);
 }
예제 #2
0
 /**
  * @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);
 }