MediaWiki  master
SwiftVirtualRESTService Class Reference

Example virtual rest service for OpenStack Swift : caching support (APC/memcached) More...

Inheritance diagram for SwiftVirtualRESTService:
Collaboration diagram for SwiftVirtualRESTService:

Public Member Functions

 __construct (array $params)
 
 onRequests (array $reqs, Closure $idGeneratorFunc)
 
 onResponses (array $reqs, Closure $idGeneratorFunc)
 
- Public Member Functions inherited from VirtualRESTService
 __construct (array $params)
 
 getName ()
 Return the name of this service, in a form suitable for error reporting or debugging. More...
 
 onRequests (array $reqs, Closure $idGeneratorFunc)
 Prepare virtual HTTP(S) requests (for this service) for execution. More...
 
 onResponses (array $reqs, Closure $idGeneratorFunc)
 Mangle or replace virtual HTTP(S) requests which have been responded to. More...
 

Protected Member Functions

 applyAuthResponse (array $req)
 
 needsAuthRequest ()
 

Protected Attributes

string $authCachedReason = null
 
int $authCachedStatus = null
 
array $authCreds
 
int $authErrorTimestamp = null
 UNIX timestamp. More...
 
int $authSessionTimestamp = 0
 UNIX timestamp. More...
 
- Protected Attributes inherited from VirtualRESTService
array $params = []
 Key/value map. More...
 

Detailed Description

Example virtual rest service for OpenStack Swift : caching support (APC/memcached)

Since
1.23

Definition at line 28 of file SwiftVirtualRESTService.php.

Constructor & Destructor Documentation

SwiftVirtualRESTService::__construct ( array  $params)
Parameters
array$paramsKey/value map
  • swiftAuthUrl : Swift authentication server URL
  • swiftUser : Swift user used by MediaWiki (account:username)
  • swiftKey : Swift authentication key for the above user
  • swiftAuthTTL : Swift authentication TTL (seconds)

Definition at line 47 of file SwiftVirtualRESTService.php.

Member Function Documentation

SwiftVirtualRESTService::applyAuthResponse ( array  $req)
protected

Definition at line 73 of file SwiftVirtualRESTService.php.

References list.

Referenced by onResponses().

SwiftVirtualRESTService::needsAuthRequest ( )
protected
Returns
int|bool HTTP status on cached failure

Definition at line 58 of file SwiftVirtualRESTService.php.

References $authCachedStatus.

Referenced by onRequests().

SwiftVirtualRESTService::onRequests ( array  $reqs,
Closure  $idGeneratorFunc 
)

Definition at line 96 of file SwiftVirtualRESTService.php.

References $authCachedReason, $authCachedStatus, $key, $req, as, and needsAuthRequest().

Referenced by onResponses().

SwiftVirtualRESTService::onResponses ( array  $reqs,
Closure  $idGeneratorFunc 
)

Member Data Documentation

string SwiftVirtualRESTService::$authCachedReason = null
protected

Definition at line 38 of file SwiftVirtualRESTService.php.

Referenced by onRequests(), and onResponses().

int SwiftVirtualRESTService::$authCachedStatus = null
protected

Definition at line 36 of file SwiftVirtualRESTService.php.

Referenced by needsAuthRequest(), onRequests(), and onResponses().

array SwiftVirtualRESTService::$authCreds
protected

Definition at line 30 of file SwiftVirtualRESTService.php.

int SwiftVirtualRESTService::$authErrorTimestamp = null
protected

UNIX timestamp.

Definition at line 34 of file SwiftVirtualRESTService.php.

int SwiftVirtualRESTService::$authSessionTimestamp = 0
protected

UNIX timestamp.

Definition at line 32 of file SwiftVirtualRESTService.php.


The documentation for this class was generated from the following file: