/** * Configure the Consumer to access the Oauth service layer * {{{ * Consumer::config(array( * 'host' => 'localhost', * 'oauth_consumer_key' => 'key', * 'oauth_consumer_secret' => 'secret', * 'request_token' => 'libraries/oauth_php/example/request_token.php', * 'access_token' => 'libraries/oauth_php/example/access_token.php', * )); * }}} * * @param array $config * - host: the oauth domain * - oauth_consumer_key: key from oauth service provider * - oauth_consumer_secret: secret from oauth service provider * - oauth_consumer_key: key from oauth service provider * - authorize: path to authorize url * - request_token: path to request token url * - access_token: path to access token url * - service: service class name oauth/oauth2 * * @return void */ public static function config($config) { if (isset($config['service'])) { static::$_service = new static::$_classes[$config['service']]($config); } else { static::$_service = new static::$_classes['oauth']($config); } }
/** * Configure the Consumer to access the Oauth service layer * {{{ * Provider::config(array( * 'host' => 'localhost', * 'oauth_consumer_key' => 'key', * 'oauth_consumer_secret' => 'secret', * 'request_token' => 'libraries/oauth_php/example/request_token.php', * 'access_token' => 'libraries/oauth_php/example/access_token.php', * )); * }}} * * @param array $config * - host: the oauth domain * - oauth_consumer_key: key from oauth service provider * - oauth_consumer_secret: secret from oauth service provider * - oauth_consumer_key: key from oauth service provider * - authorize: path to authorize url * - request_token: path to request token url * - access_token: path to access token url * * @return void */ public static function config($config) { static::$_service = new Oauth1($config); }
/** * Configure the Consumer to access the Oauth service layer * {{{ * Consumer::config(array( * 'host' => 'localhost', * 'oauth_consumer_key' => 'key', * 'oauth_consumer_secret' => 'secret', * 'request_token' => 'libraries/oauth_php/example/request_token.php', * 'access_token' => 'libraries/oauth_php/example/access_token.php', * )); * }}} * * @param array $config * - host: the oauth domain * - oauth_consumer_key: key from oauth service provider * - oauth_consumer_secret: secret from oauth service provider * - oauth_consumer_key: key from oauth service provider * - authorize: path to authorize url * - request_token: path to request token url * - access_token: path to access token url * * @return void */ public static function config($config) { static::$_service = new static::$_classes['oauth']($config); }