* This class defines the methods as abstract that subclasses must implement.
* Outside callers can assume that all backends will have these functions.
*
- * All "storage paths" are of the format "mwstore://backend/container/path".
- * The paths use UNIX file system (FS) notation, though any particular backend may
- * not actually be using a local filesystem. Therefore, the paths are only virtual.
+ * All "storage paths" are of the format "mwstore://<backend>/<container>/<path>".
+ * The <path> portion is a relative path that uses UNIX file system (FS) notation,
+ * though any particular backend may not actually be using a local filesystem.
+ * Therefore, the relative paths are only virtual.
*
* Backend contents are stored under wiki-specific container names by default.
* For legacy reasons, this has no effect for the FS backend class, and per-wiki
}
/**
- * @brief Base class for all backends associated with a particular storage medium.
+ * @brief Base class for all backends using particular storage medium.
*
* This class defines the methods as abstract that subclasses must implement.
* Outside callers should *not* use functions with "Internal" in the name.
*/
/**
+ * @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.
$status = Status::newGood();
$performOps = array(); // list of FileOp objects
- $filesRead = $filesChanged = array(); // storage paths used
+ $filesRead = array(); // storage paths read from
+ $filesChanged = array(); // storage paths written to
// Build up a list of FileOps. The list will have all the ops
// for one backend, then all the ops for the next, and so on.
// These batches of ops are all part of a continuous array.
$subStatus = FileOp::attemptBatch( $performOps, $opts );
$success = array();
- $failCount = $successCount = 0;
+ $failCount = 0;
+ $successCount = 0;
// Make 'success', 'successCount', and 'failCount' fields reflect
// the overall operation, rather than all the batches for each backend.
// Do this by only using success values from the master backend's batch.
* @see FileBackend::doPrepare()
* @return Status
*/
- public function doPrepare( array $params ) {
+ protected function doPrepare( array $params ) {
$status = Status::newGood();
foreach ( $this->backends as $backend ) {
$realParams = $this->substOpPaths( $params, $backend );
* @see FileBackend::doSecure()
* @return Status
*/
- public function doSecure( array $params ) {
+ protected function doSecure( array $params ) {
$status = Status::newGood();
foreach ( $this->backends as $backend ) {
$realParams = $this->substOpPaths( $params, $backend );
* @see FileBackend::doClean()
* @return Status
*/
- public function doClean( array $params ) {
+ protected function doClean( array $params ) {
$status = Status::newGood();
foreach ( $this->backends as $backend ) {
$realParams = $this->substOpPaths( $params, $backend );