HTTP_OAuth
[ class tree: HTTP_OAuth ] [ index: HTTP_OAuth ] [ all elements ]

Class: HTTP_OAuth_Store_Consumer_CacheLite

Source Location: /HTTP_OAuth-0.3.1/HTTP/OAuth/Store/Consumer/CacheLite.php

Class Overview


Cache_Lite driver for HTTP_OAuth_Store_Consumer_Interface


Author(s):

Copyright:

  • 2010 Bill Shupp

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Cache_Lite driver for HTTP_OAuth_Store_Consumer_Interface


[ Top ]


Class Variables

$cache =  null

[line 43]

Instance of Cache_Lite
  • Access: protected

Type:   Cache_Lite|null


[ Top ]

$defaultOptions = array(
        'cacheDir'             => '/tmp',
        'lifeTime'             => 300,
        'hashedDirectoryLevel' => 2
    )

[line 58]

Default options for Cache_Lite
  • Access: protected

Type:   array


[ Top ]

$options = array()

[line 51]

CacheLite options

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 72]

void __construct( [array $options = array()])

Instantiate Cache_Lite. Allows for options to be passed to Cache_Lite.
  • Access: public

Parameters:

array   $options   —  Options for Cache_Lite constructor

[ Top ]

ensureDirectoryExists   [line 224]

void ensureDirectoryExists( string $dir)

Make sure the given sub directory exists. If not, create it.
  • Access: protected

Parameters:

string   $dir   —  The full path to the sub director we plan to write to

[ Top ]

getAccessToken   [line 144]

HTTP_OAuth_Store_Data getAccessToken( string $consumerUserID, string $providerName)

Gets access token data in the form of an HTTP_OAuth_Store_Data object
  • Access: public

Parameters:

string   $consumerUserID   —  The end user's ID at the consumer
string   $providerName   —  The provider name (i.e. 'twitter')

[ Top ]

getAccessTokenKey   [line 192]

void getAccessTokenKey( string $consumerUserID, string $providerName)

Gets an access token key for storage, based on the consumer user ID and the provider name
  • Access: protected

Parameters:

string   $consumerUserID   —  The end user's ID at the consumer
string   $providerName   —  The provider name (i.e. 'twitter')

[ Top ]

getRequestToken   [line 113]

array getRequestToken( string $providerName, string $sessionID)

Gets a request token as an array of the token, tokenSecret, providerName, and sessionID (array key names)
  • Return: on success, false on failure
  • Access: public

Parameters:

string   $providerName   —  The provider name (i.e. 'twitter')
string   $sessionID   —  A string representing this user's session

[ Top ]

getRequestTokenKey   [line 131]

string getRequestTokenKey( string $providerName, string $sessionID)

Gets a cache key for request tokens. It's an md5 hash of the provider name and sessionID
  • Access: protected

Parameters:

string   $providerName   —  The provider name (i.e. 'twitter')
string   $sessionID   —  A string representing this user's session

[ Top ]

removeAccessToken   [line 175]

bool removeAccessToken( HTTP_OAuth_Store_Data $data)

Removes an access token
  • Return: true on success, false or PEAR_Error on failure
  • Access: public

Parameters:

HTTP_OAuth_Store_Data   $data   —  The access token data

[ Top ]

setAccessToken   [line 160]

bool setAccessToken( HTTP_OAuth_Store_Data $data)

Sets access token data from an HTTP_OAuth_Store_Data object
  • Return: true on success, false or PEAR_Error on failure
  • Access: public

Parameters:

HTTP_OAuth_Store_Data   $data   —  The access token data

[ Top ]

setOptions   [line 206]

void setOptions( string $key, [string $expire = null])

Sets options for Cache_Lite based on the needs of the current method.

Options set include the subdirectory to be used, and the expiration.

  • Access: protected

Parameters:

string   $key   —  The sub-directory of the cacheDir
string   $expire   —  The cache lifetime (expire) to be used

[ Top ]

setRequestToken   [line 88]

true setRequestToken( string $token, string $tokenSecret, string $providerName, string $sessionID)

Sets a request token
  • Return: on success, false or PEAR_Error on failure
  • Access: public

Parameters:

string   $token   —  The request token
string   $tokenSecret   —  The request token secret
string   $providerName   —  The name of the provider (i.e. 'twitter')
string   $sessionID   —  A string representing this user's session

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:55:06 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.