Index: trunk/phase3/includes/filerepo/backend/FileBackendMultiWrite.php |
— | — | @@ -6,6 +6,8 @@ |
7 | 7 | */ |
8 | 8 | |
9 | 9 | /** |
| 10 | + * @brief Proxy backend that mirrors writes to several internal backends. |
| 11 | + * |
10 | 12 | * This class defines a multi-write backend. Multiple backends can be |
11 | 13 | * registered to this proxy backend and it will act as a single backend. |
12 | 14 | * Use this when all access to those backends is through this proxy backend. |
— | — | @@ -82,7 +84,8 @@ |
83 | 85 | $status = Status::newGood(); |
84 | 86 | |
85 | 87 | $performOps = array(); // list of FileOp objects |
86 | | - $filesRead = $filesChanged = array(); // storage paths used |
| 88 | + $filesRead = array(); // storage paths read from |
| 89 | + $filesChanged = array(); // storage paths written to |
87 | 90 | // Build up a list of FileOps. The list will have all the ops |
88 | 91 | // for one backend, then all the ops for the next, and so on. |
89 | 92 | // These batches of ops are all part of a continuous array. |
— | — | @@ -133,7 +136,8 @@ |
134 | 137 | $subStatus = FileOp::attemptBatch( $performOps, $opts ); |
135 | 138 | |
136 | 139 | $success = array(); |
137 | | - $failCount = $successCount = 0; |
| 140 | + $failCount = 0; |
| 141 | + $successCount = 0; |
138 | 142 | // Make 'success', 'successCount', and 'failCount' fields reflect |
139 | 143 | // the overall operation, rather than all the batches for each backend. |
140 | 144 | // Do this by only using success values from the master backend's batch. |
— | — | @@ -280,7 +284,7 @@ |
281 | 285 | * @see FileBackend::doPrepare() |
282 | 286 | * @return Status |
283 | 287 | */ |
284 | | - public function doPrepare( array $params ) { |
| 288 | + protected function doPrepare( array $params ) { |
285 | 289 | $status = Status::newGood(); |
286 | 290 | foreach ( $this->backends as $backend ) { |
287 | 291 | $realParams = $this->substOpPaths( $params, $backend ); |
— | — | @@ -293,7 +297,7 @@ |
294 | 298 | * @see FileBackend::doSecure() |
295 | 299 | * @return Status |
296 | 300 | */ |
297 | | - public function doSecure( array $params ) { |
| 301 | + protected function doSecure( array $params ) { |
298 | 302 | $status = Status::newGood(); |
299 | 303 | foreach ( $this->backends as $backend ) { |
300 | 304 | $realParams = $this->substOpPaths( $params, $backend ); |
— | — | @@ -306,7 +310,7 @@ |
307 | 311 | * @see FileBackend::doClean() |
308 | 312 | * @return Status |
309 | 313 | */ |
310 | | - public function doClean( array $params ) { |
| 314 | + protected function doClean( array $params ) { |
311 | 315 | $status = Status::newGood(); |
312 | 316 | foreach ( $this->backends as $backend ) { |
313 | 317 | $realParams = $this->substOpPaths( $params, $backend ); |
Index: trunk/phase3/includes/filerepo/backend/FileOp.php |
— | — | @@ -40,8 +40,8 @@ |
41 | 41 | /** |
42 | 42 | * Build a new file operation transaction |
43 | 43 | * |
44 | | - * @params $backend FileBackendStore |
45 | | - * @params $params Array |
| 44 | + * @param $backend FileBackendStore |
| 45 | + * @param $params Array |
46 | 46 | * @throws MWException |
47 | 47 | */ |
48 | 48 | final public function __construct( FileBackendStore $backend, array $params ) { |
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -19,9 +19,10 @@ |
20 | 20 | * This class defines the methods as abstract that subclasses must implement. |
21 | 21 | * Outside callers can assume that all backends will have these functions. |
22 | 22 | * |
23 | | - * All "storage paths" are of the format "mwstore://backend/container/path". |
24 | | - * The paths use UNIX file system (FS) notation, though any particular backend may |
25 | | - * not actually be using a local filesystem. Therefore, the paths are only virtual. |
| 23 | + * All "storage paths" are of the format "mwstore://<backend>/<container>/<path>". |
| 24 | + * The <path> portion is a relative path that uses UNIX file system (FS) notation, |
| 25 | + * though any particular backend may not actually be using a local filesystem. |
| 26 | + * Therefore, the relative paths are only virtual. |
26 | 27 | * |
27 | 28 | * Backend contents are stored under wiki-specific container names by default. |
28 | 29 | * For legacy reasons, this has no effect for the FS backend class, and per-wiki |
— | — | @@ -710,7 +711,7 @@ |
711 | 712 | } |
712 | 713 | |
713 | 714 | /** |
714 | | - * @brief Base class for all backends associated with a particular storage medium. |
| 715 | + * @brief Base class for all backends using particular storage medium. |
715 | 716 | * |
716 | 717 | * This class defines the methods as abstract that subclasses must implement. |
717 | 718 | * Outside callers should *not* use functions with "Internal" in the name. |