MediaWiki master
Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle Class Reference

Inherits Wikimedia\FileBackend\FileOpHandle\FileBackendStoreOpHandle.

Collaboration diagram for Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle:

Public Member Functions

 __construct (SwiftFileBackend $backend, Closure $callback, array $httpOp)
 Construct a handle to be use with SwiftFileOpHandle::doExecuteOpHandlesInternal()
 
- Public Member Functions inherited from Wikimedia\FileBackend\FileOpHandle\FileBackendStoreOpHandle
 closeResources ()
 Close all open file handles.
 

Public Attributes

Closure $callback
 Function to run after each HTTP request finishes.
 
array[] $httpOp
 List of HTTP request maps for SwiftFileBackend::requestWithAuth.
 
int $state = self::CONTINUE_IF_OK
 Class CONTINUE_* constant.
 
- Public Attributes inherited from Wikimedia\FileBackend\FileOpHandle\FileBackendStoreOpHandle
FileBackendStore $backend
 
callable $call
 name that identifies the function called
 
array $params = []
 
array $resourcesToClose = []
 

Detailed Description

Definition at line 30 of file SwiftFileOpHandle.php.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle::__construct ( SwiftFileBackend $backend,
Closure $callback,
array $httpOp )

Construct a handle to be use with SwiftFileOpHandle::doExecuteOpHandlesInternal()

The callback returns a class CONTINUE_* constant and takes the following parameters:

  • An HTTP request map array with 'response' filled
  • A StatusValue instance to be updated as needed
Parameters
SwiftFileBackend$backend
Closure$callback
array$httpOpRequest to send via SwiftFileBackend::requestWithAuth()

Definition at line 55 of file SwiftFileOpHandle.php.

References Wikimedia\FileBackend\FileOpHandle\FileBackendStoreOpHandle\$backend, Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle\$callback, and Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle\$httpOp.

Member Data Documentation

◆ $callback

Closure Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle::$callback

Function to run after each HTTP request finishes.

Definition at line 34 of file SwiftFileOpHandle.php.

Referenced by Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle\__construct().

◆ $httpOp

array [] Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle::$httpOp

List of HTTP request maps for SwiftFileBackend::requestWithAuth.

Definition at line 32 of file SwiftFileOpHandle.php.

Referenced by Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle\__construct().

◆ $state

int Wikimedia\FileBackend\FileOpHandle\SwiftFileOpHandle::$state = self::CONTINUE_IF_OK

Class CONTINUE_* constant.

Definition at line 37 of file SwiftFileOpHandle.php.


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