PHP Class Horde_Service_Twitter, horde

Author: Michael J. Rubinsky ([email protected])
Mostrar archivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_auth Horde_Service_Twitter_Auth Can't lazy load the auth or request class since we need to know early if we are OAuth or Basic
$_cacheLifetime integer Default cache lifetime.
$_httpClient Horde_Http_Client The http client.
$_logger Horde_Log_Logger Optional logger.
$_objCache Cache for the various objects we lazy load in __get()
$_request Horde_Service_Twitter_Request The twitter request object.
$_responseCache Horde_Cache (Optional) Cache object.

Public Methods

Method Description
__construct ( Horde_Service_Twitter_Auth $auth, Horde_Service_Twitter_Request $request ) Constructor.
__get ( string $value ) : Horde_Service_Twitter_ Lazy load the twitter classes.
create ( array $params ) : Horde_Service_Twitter Factory method to easily build a working Twitter client object.
getHttpClient ( ) : Horde_Http_Client Get the http client.
setCache ( Horde_Cache $cache )
setHttpClient ( Horde_Http_Client $client ) Set the http client.
setLogger ( Horde_Log_Logger $logger )

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Service_Twitter_Auth $auth, Horde_Service_Twitter_Request $request )
$auth Horde_Service_Twitter_Auth An authentication object
$request Horde_Service_Twitter_Request A request object.

__get() public method

Lazy load the twitter classes.
public __get ( string $value ) : Horde_Service_Twitter_
$value string The lowercase representation of the subclass.
return Horde_Service_Twitter_

create() public static method

Factory method to easily build a working Twitter client object.
public static create ( array $params ) : Horde_Service_Twitter
$params array Configuration parameters, with the following keys: - 'oauth' (required): - 'consumer_key' (required): The application's consumer key - 'consumer_secret' (required): The application's consumer secret - 'access_token' (optional): The user's access token - 'access_token_secret' (optional): The user's access token secret. - 'http' (optional): any configuration parameters for Horde_Http_Client, e.g. proxy settings.
return Horde_Service_Twitter A twitter object that can be used immediately to update and receive statuses etc.

getHttpClient() public method

Get the http client.
public getHttpClient ( ) : Horde_Http_Client
return Horde_Http_Client

setCache() public method

public setCache ( Horde_Cache $cache )
$cache Horde_Cache

setHttpClient() public method

Set the http client.
public setHttpClient ( Horde_Http_Client $client )
$client Horde_Http_Client The http client

setLogger() public method

public setLogger ( Horde_Log_Logger $logger )
$logger Horde_Log_Logger

Property Details

$_auth protected_oe property

Can't lazy load the auth or request class since we need to know early if we are OAuth or Basic
protected Horde_Service_Twitter_Auth $_auth
return Horde_Service_Twitter_Auth

$_cacheLifetime protected_oe property

Default cache lifetime.
protected int $_cacheLifetime
return integer

$_httpClient protected_oe property

The http client.
protected Horde_Http_Client $_httpClient
return Horde_Http_Client

$_logger protected_oe property

Optional logger.
protected Horde_Log_Logger $_logger
return Horde_Log_Logger

$_objCache protected_oe property

Cache for the various objects we lazy load in __get()
protected $_objCache

$_request protected_oe property

The twitter request object.
protected Horde_Service_Twitter_Request $_request
return Horde_Service_Twitter_Request

$_responseCache protected_oe property

(Optional) Cache object.
protected Horde_Cache $_responseCache
return Horde_Cache