/**
* @brief Proxy backend that mirrors writes to several internal backends.
- *
+ *
* This class defines a multi-write backend. Multiple backends can be
* registered to this proxy backend and it will act as a single backend.
* Use this when all access to those backends is through this proxy backend.
foreach ( $this->backends as $index => $backend ) {
$backendOps = $this->substOpBatchPaths( $ops, $backend );
// Add on the operation batch for this backend
- $performOps = array_merge( $performOps, $backend->getOperations( $backendOps ) );
+ $performOps = array_merge( $performOps,
+ $backend->getOperationsInternal( $backendOps ) );
if ( $index == 0 ) { // first batch
// Get the files used for these operations. Each backend has a batch of
// the same operations, so we only need to get them from the first batch.
/**
* Substitute the backend name in storage path parameters
* for a set of operations with that of a given internal backend.
- *
+ *
* @param $ops Array List of file operation arrays
* @param $backend FileBackendStore
* @return Array
/**
* Same as substOpBatchPaths() but for a single operation
- *
+ *
* @param $op File operation array
* @param $backend FileBackendStore
* @return Array
/**
* Substitute the backend of storage paths with an internal backend's name
- *
+ *
* @param $paths Array|string List of paths or single string path
* @param $backend FileBackendStore
* @return Array|string
/**
* Substitute the backend of internal storage paths with the proxy backend's name
- *
+ *
* @param $paths Array|string List of paths or single string path
* @return Array|string
*/
* @return Array List of FileOp objects
* @throws MWException
*/
- final public function getOperations( array $ops ) {
+ final public function getOperationsInternal( array $ops ) {
$supportedOps = $this->supportedOperations();
$performOps = array(); // array of FileOp objects
// Append the FileOp class
$performOps[] = new $class( $this, $params );
} else {
- throw new MWException( "Operation `$opName` is not supported." );
+ throw new MWException( "Operation '$opName' is not supported." );
}
}
$status = Status::newGood();
// Build up a list of FileOps...
- $performOps = $this->getOperations( $ops );
+ $performOps = $this->getOperationsInternal( $ops );
// Acquire any locks as needed...
if ( empty( $opts['nonLocking'] ) ) {