class OAuthHTTPBatch in Feeds OAuth 6
Definition of the import batch object created on the fetching stage by OAuthHTTPFetcher.
Hierarchy
- class \FeedsBatch
- class \FeedsImportBatch
- class \OAuthHTTPBatch
- class \FeedsImportBatch
Expanded class hierarchy of OAuthHTTPBatch
File
- ./
OAuthHTTPFetcher.inc, line 7
View source
class OAuthHTTPBatch extends FeedsImportBatch {
protected $url;
protected $authenticator;
protected $consumer_key;
protected $consumer_secret;
protected $site_id;
protected $uid;
/**
* Constructor.
*/
public function __construct($url, $authenticator, $consumer_key, $consumer_secret, $site_id, $uid) {
$this->url = $url;
$this->authenticator = $authenticator;
$this->consumer_key = $consumer_key;
$this->consumer_secret = $consumer_secret;
$this->site_id = $site_id;
$this->uid = $uid;
parent::__construct();
}
/**
* Implementation of FeedsImportBatch::getRaw();
*/
public function getRaw() {
$access_token = call_user_func($this->authenticator, $this->uid, $this->site_id);
$oauth = new OAuth($this->consumer_key, $this->consumer_secret, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);
$oauth
->setToken($access_token['oauth_token'], $access_token['oauth_token_secret']);
if ($oauth
->fetch($this->url)) {
return $oauth
->getLastResponse();
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FeedsBatch:: |
protected | property | ||
FeedsBatch:: |
protected | property | ||
FeedsBatch:: |
public | function | Report progress. | |
FeedsBatch:: |
public | function | Get the total for a stage. | |
FeedsBatch:: |
public | function | Set progress for a stage. | |
FeedsBatch:: |
public | function | Set the total for a stage. | |
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
protected | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | property | ||
FeedsImportBatch:: |
public | function | Add an item. | |
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | 1 | |
FeedsImportBatch:: |
public | function | Get number of items. | |
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | ||
FeedsImportBatch:: |
public | function | Set description. | |
FeedsImportBatch:: |
public | function | Set items. | |
FeedsImportBatch:: |
public | function | Set link. | |
FeedsImportBatch:: |
public | function | Set title. | |
FeedsImportBatch:: |
public | function | @todo Move to a nextItem() based approach, not consuming the item array. Can only be done once we don't cache the entire batch object between page loads for batching anymore. | |
OAuthHTTPBatch:: |
protected | property | ||
OAuthHTTPBatch:: |
protected | property | ||
OAuthHTTPBatch:: |
protected | property | ||
OAuthHTTPBatch:: |
protected | property | ||
OAuthHTTPBatch:: |
protected | property | ||
OAuthHTTPBatch:: |
protected | property | ||
OAuthHTTPBatch:: |
public | function |
Implementation of FeedsImportBatch::getRaw(); Overrides FeedsImportBatch:: |
|
OAuthHTTPBatch:: |
public | function |
Constructor. Overrides FeedsImportBatch:: |