Index: trunk/phase3/includes/filerepo/backend/FileBackendMultiWrite.php |
— | — | @@ -20,17 +20,17 @@ |
21 | 21 | * @ingroup FileBackend |
22 | 22 | * @since 1.19 |
23 | 23 | */ |
24 | | -class FileBackendMultiWrite extends FileBackendBase { |
25 | | - /** @var Array Prioritized list of FileBackend objects */ |
| 24 | +class FileBackendMultiWrite extends FileBackend { |
| 25 | + /** @var Array Prioritized list of FileBackendStore objects */ |
26 | 26 | protected $backends = array(); // array of (backend index => backends) |
27 | | - protected $masterIndex = -1; // index of master backend |
| 27 | + protected $masterIndex = -1; // integer; index of master backend |
28 | 28 | |
29 | 29 | /** |
30 | 30 | * Construct a proxy backend that consists of several internal backends. |
31 | 31 | * Additional $config params include: |
32 | 32 | * 'backends' : Array of backend config and multi-backend settings. |
33 | 33 | * Each value is the config used in the constructor of a |
34 | | - * FileBackend class, but with these additional settings: |
| 34 | + * FileBackendStore class, but with these additional settings: |
35 | 35 | * 'class' : The name of the backend class |
36 | 36 | * 'isMultiMaster' : This must be set for one backend. |
37 | 37 | * @param $config Array |
— | — | @@ -64,7 +64,7 @@ |
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
68 | | - * @see FileBackendBase::doOperationsInternal() |
| 68 | + * @see FileBackend::doOperationsInternal() |
69 | 69 | */ |
70 | 70 | final protected function doOperationsInternal( array $ops, array $opts ) { |
71 | 71 | $status = Status::newGood(); |
— | — | @@ -196,10 +196,10 @@ |
197 | 197 | * for a set of operations with that of a given internal backend. |
198 | 198 | * |
199 | 199 | * @param $ops Array List of file operation arrays |
200 | | - * @param $backend FileBackend |
| 200 | + * @param $backend FileBackendStore |
201 | 201 | * @return Array |
202 | 202 | */ |
203 | | - protected function substOpBatchPaths( array $ops, FileBackend $backend ) { |
| 203 | + protected function substOpBatchPaths( array $ops, FileBackendStore $backend ) { |
204 | 204 | $newOps = array(); // operations |
205 | 205 | foreach ( $ops as $op ) { |
206 | 206 | $newOp = $op; // operation |
— | — | @@ -217,10 +217,10 @@ |
218 | 218 | * Same as substOpBatchPaths() but for a single operation |
219 | 219 | * |
220 | 220 | * @param $op File operation array |
221 | | - * @param $backend FileBackend |
| 221 | + * @param $backend FileBackendStore |
222 | 222 | * @return Array |
223 | 223 | */ |
224 | | - protected function substOpPaths( array $ops, FileBackend $backend ) { |
| 224 | + protected function substOpPaths( array $ops, FileBackendStore $backend ) { |
225 | 225 | $newOps = $this->substOpBatchPaths( array( $ops ), $backend ); |
226 | 226 | return $newOps[0]; |
227 | 227 | } |
— | — | @@ -229,10 +229,10 @@ |
230 | 230 | * Substitute the backend of storage paths with an internal backend's name |
231 | 231 | * |
232 | 232 | * @param $paths Array|string List of paths or single string path |
233 | | - * @param $backend FileBackend |
| 233 | + * @param $backend FileBackendStore |
234 | 234 | * @return Array|string |
235 | 235 | */ |
236 | | - protected function substPaths( $paths, FileBackend $backend ) { |
| 236 | + protected function substPaths( $paths, FileBackendStore $backend ) { |
237 | 237 | return preg_replace( |
238 | 238 | '!^mwstore://' . preg_quote( $this->name ) . '/!', |
239 | 239 | 'mwstore://' . $backend->getName() . '/', |
— | — | @@ -255,7 +255,7 @@ |
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
259 | | - * @see FileBackendBase::doPrepare() |
| 259 | + * @see FileBackend::doPrepare() |
260 | 260 | */ |
261 | 261 | public function doPrepare( array $params ) { |
262 | 262 | $status = Status::newGood(); |
— | — | @@ -267,7 +267,7 @@ |
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
271 | | - * @see FileBackendBase::doSecure() |
| 271 | + * @see FileBackend::doSecure() |
272 | 272 | */ |
273 | 273 | public function doSecure( array $params ) { |
274 | 274 | $status = Status::newGood(); |
— | — | @@ -279,7 +279,7 @@ |
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
283 | | - * @see FileBackendBase::doClean() |
| 283 | + * @see FileBackend::doClean() |
284 | 284 | */ |
285 | 285 | public function doClean( array $params ) { |
286 | 286 | $status = Status::newGood(); |
— | — | @@ -291,7 +291,7 @@ |
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
295 | | - * @see FileBackendBase::getFileList() |
| 295 | + * @see FileBackend::getFileList() |
296 | 296 | */ |
297 | 297 | public function concatenate( array $params ) { |
298 | 298 | // We are writing to an FS file, so we don't need to do this per-backend |
— | — | @@ -300,7 +300,7 @@ |
301 | 301 | } |
302 | 302 | |
303 | 303 | /** |
304 | | - * @see FileBackendBase::fileExists() |
| 304 | + * @see FileBackend::fileExists() |
305 | 305 | */ |
306 | 306 | public function fileExists( array $params ) { |
307 | 307 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -308,7 +308,7 @@ |
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
312 | | - * @see FileBackendBase::getFileTimestamp() |
| 312 | + * @see FileBackend::getFileTimestamp() |
313 | 313 | */ |
314 | 314 | public function getFileTimestamp( array $params ) { |
315 | 315 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -316,7 +316,7 @@ |
317 | 317 | } |
318 | 318 | |
319 | 319 | /** |
320 | | - * @see FileBackendBase::getFileSize() |
| 320 | + * @see FileBackend::getFileSize() |
321 | 321 | */ |
322 | 322 | public function getFileSize( array $params ) { |
323 | 323 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | } |
326 | 326 | |
327 | 327 | /** |
328 | | - * @see FileBackendBase::getFileStat() |
| 328 | + * @see FileBackend::getFileStat() |
329 | 329 | */ |
330 | 330 | public function getFileStat( array $params ) { |
331 | 331 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -332,7 +332,7 @@ |
333 | 333 | } |
334 | 334 | |
335 | 335 | /** |
336 | | - * @see FileBackendBase::getFileContents() |
| 336 | + * @see FileBackend::getFileContents() |
337 | 337 | */ |
338 | 338 | public function getFileContents( array $params ) { |
339 | 339 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -340,7 +340,7 @@ |
341 | 341 | } |
342 | 342 | |
343 | 343 | /** |
344 | | - * @see FileBackendBase::getFileSha1Base36() |
| 344 | + * @see FileBackend::getFileSha1Base36() |
345 | 345 | */ |
346 | 346 | public function getFileSha1Base36( array $params ) { |
347 | 347 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -348,7 +348,7 @@ |
349 | 349 | } |
350 | 350 | |
351 | 351 | /** |
352 | | - * @see FileBackendBase::getFileProps() |
| 352 | + * @see FileBackend::getFileProps() |
353 | 353 | */ |
354 | 354 | public function getFileProps( array $params ) { |
355 | 355 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -356,7 +356,7 @@ |
357 | 357 | } |
358 | 358 | |
359 | 359 | /** |
360 | | - * @see FileBackendBase::streamFile() |
| 360 | + * @see FileBackend::streamFile() |
361 | 361 | */ |
362 | 362 | public function streamFile( array $params ) { |
363 | 363 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -364,7 +364,7 @@ |
365 | 365 | } |
366 | 366 | |
367 | 367 | /** |
368 | | - * @see FileBackendBase::getLocalReference() |
| 368 | + * @see FileBackend::getLocalReference() |
369 | 369 | */ |
370 | 370 | public function getLocalReference( array $params ) { |
371 | 371 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -372,7 +372,7 @@ |
373 | 373 | } |
374 | 374 | |
375 | 375 | /** |
376 | | - * @see FileBackendBase::getLocalCopy() |
| 376 | + * @see FileBackend::getLocalCopy() |
377 | 377 | */ |
378 | 378 | public function getLocalCopy( array $params ) { |
379 | 379 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -380,7 +380,7 @@ |
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
384 | | - * @see FileBackendBase::getFileList() |
| 384 | + * @see FileBackend::getFileList() |
385 | 385 | */ |
386 | 386 | public function getFileList( array $params ) { |
387 | 387 | $realParams = $this->substOpPaths( $params, $this->backends[$this->masterIndex] ); |
— | — | @@ -388,7 +388,7 @@ |
389 | 389 | } |
390 | 390 | |
391 | 391 | /** |
392 | | - * @see FileBackendBase::clearCache() |
| 392 | + * @see FileBackend::clearCache() |
393 | 393 | */ |
394 | 394 | public function clearCache( array $paths = null ) { |
395 | 395 | foreach ( $this->backends as $backend ) { |
Index: trunk/phase3/includes/filerepo/backend/FileOp.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | abstract class FileOp { |
20 | 20 | /** @var Array */ |
21 | 21 | protected $params = array(); |
22 | | - /** @var FileBackendBase */ |
| 22 | + /** @var FileBackendStore */ |
23 | 23 | protected $backend; |
24 | 24 | |
25 | 25 | protected $state = self::STATE_NEW; // integer |
— | — | @@ -40,11 +40,11 @@ |
41 | 41 | /** |
42 | 42 | * Build a new file operation transaction |
43 | 43 | * |
44 | | - * @params $backend FileBackend |
| 44 | + * @params $backend FileBackendStore |
45 | 45 | * @params $params Array |
46 | 46 | * @throws MWException |
47 | 47 | */ |
48 | | - final public function __construct( FileBackendBase $backend, array $params ) { |
| 48 | + final public function __construct( FileBackendStore $backend, array $params ) { |
49 | 49 | $this->backend = $backend; |
50 | 50 | list( $required, $optional ) = $this->allowedParams(); |
51 | 51 | foreach ( $required as $name ) { |
— | — | @@ -387,7 +387,7 @@ |
388 | 388 | |
389 | 389 | /** |
390 | 390 | * Store a file into the backend from a file on the file system. |
391 | | - * Parameters similar to FileBackend::storeInternal(), which include: |
| 391 | + * Parameters similar to FileBackendStore::storeInternal(), which include: |
392 | 392 | * src : source path on file system |
393 | 393 | * dst : destination storage path |
394 | 394 | * overwrite : do nothing and pass if an identical file exists at destination |
— | — | @@ -449,7 +449,7 @@ |
450 | 450 | |
451 | 451 | /** |
452 | 452 | * Create a file in the backend with the given content. |
453 | | - * Parameters similar to FileBackend::createInternal(), which include: |
| 453 | + * Parameters similar to FileBackendStore::createInternal(), which include: |
454 | 454 | * content : the raw file contents |
455 | 455 | * dst : destination storage path |
456 | 456 | * overwrite : do nothing and pass if an identical file exists at destination |
— | — | @@ -501,7 +501,7 @@ |
502 | 502 | |
503 | 503 | /** |
504 | 504 | * Copy a file from one storage path to another in the backend. |
505 | | - * Parameters similar to FileBackend::copyInternal(), which include: |
| 505 | + * Parameters similar to FileBackendStore::copyInternal(), which include: |
506 | 506 | * src : source storage path |
507 | 507 | * dst : destination storage path |
508 | 508 | * overwrite : do nothing and pass if an identical file exists at destination |
— | — | @@ -556,7 +556,7 @@ |
557 | 557 | |
558 | 558 | /** |
559 | 559 | * Move a file from one storage path to another in the backend. |
560 | | - * Parameters similar to FileBackend::moveInternal(), which include: |
| 560 | + * Parameters similar to FileBackendStore::moveInternal(), which include: |
561 | 561 | * src : source storage path |
562 | 562 | * dst : destination storage path |
563 | 563 | * overwrite : do nothing and pass if an identical file exists at destination |
— | — | @@ -617,7 +617,7 @@ |
618 | 618 | |
619 | 619 | /** |
620 | 620 | * Delete a file at the given storage path from the backend. |
621 | | - * Parameters similar to FileBackend::deleteInternal(), which include: |
| 621 | + * Parameters similar to FileBackendStore::deleteInternal(), which include: |
622 | 622 | * src : source storage path |
623 | 623 | * ignoreMissingSource : don't return an error if the file does not exist |
624 | 624 | */ |
Index: trunk/phase3/includes/filerepo/backend/FSFileBackend.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | * @ingroup FileBackend |
23 | 23 | * @since 1.19 |
24 | 24 | */ |
25 | | -class FSFileBackend extends FileBackend { |
| 25 | +class FSFileBackend extends FileBackendStore { |
26 | 26 | protected $basePath; // string; directory holding the container directories |
27 | 27 | /** @var Array Map of container names to root paths */ |
28 | 28 | protected $containerPaths = array(); // for custom container paths |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | protected $hadWarningErrors = array(); |
32 | 32 | |
33 | 33 | /** |
34 | | - * @see FileBackend::__construct() |
| 34 | + * @see FileBackendStore::__construct() |
35 | 35 | * Additional $config params include: |
36 | 36 | * basePath : File system directory that holds containers. |
37 | 37 | * containerPaths : Map of container names to custom file system directories. |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | | - * @see FileBackend::resolveContainerName() |
| 62 | + * @see FileBackendStore::resolveContainerName() |
63 | 63 | */ |
64 | 64 | protected function resolveContainerName( $container ) { |
65 | 65 | if ( $container !== '.' ) { |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | | - * @see FileBackend::resolveContainerPath() |
| 72 | + * @see FileBackendStore::resolveContainerPath() |
73 | 73 | */ |
74 | 74 | protected function resolveContainerPath( $container, $relStoragePath ) { |
75 | 75 | if ( isset( $this->containerPaths[$container] ) || isset( $this->basePath ) ) { |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
118 | | - * @see FileBackend::isPathUsableInternal() |
| 118 | + * @see FileBackendStore::isPathUsableInternal() |
119 | 119 | */ |
120 | 120 | public function isPathUsableInternal( $storagePath ) { |
121 | 121 | $fsPath = $this->resolveToFSPath( $storagePath ); |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
139 | | - * @see FileBackend::doStoreInternal() |
| 139 | + * @see FileBackendStore::doStoreInternal() |
140 | 140 | */ |
141 | 141 | protected function doStoreInternal( array $params ) { |
142 | 142 | $status = Status::newGood(); |
— | — | @@ -175,7 +175,7 @@ |
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | | - * @see FileBackend::doCopyInternal() |
| 179 | + * @see FileBackendStore::doCopyInternal() |
180 | 180 | */ |
181 | 181 | protected function doCopyInternal( array $params ) { |
182 | 182 | $status = Status::newGood(); |
— | — | @@ -221,7 +221,7 @@ |
222 | 222 | } |
223 | 223 | |
224 | 224 | /** |
225 | | - * @see FileBackend::doMoveInternal() |
| 225 | + * @see FileBackendStore::doMoveInternal() |
226 | 226 | */ |
227 | 227 | protected function doMoveInternal( array $params ) { |
228 | 228 | $status = Status::newGood(); |
— | — | @@ -269,7 +269,7 @@ |
270 | 270 | } |
271 | 271 | |
272 | 272 | /** |
273 | | - * @see FileBackend::doDeleteInternal() |
| 273 | + * @see FileBackendStore::doDeleteInternal() |
274 | 274 | */ |
275 | 275 | protected function doDeleteInternal( array $params ) { |
276 | 276 | $status = Status::newGood(); |
— | — | @@ -299,7 +299,7 @@ |
300 | 300 | } |
301 | 301 | |
302 | 302 | /** |
303 | | - * @see FileBackend::doCreateInternal() |
| 303 | + * @see FileBackendStore::doCreateInternal() |
304 | 304 | */ |
305 | 305 | protected function doCreateInternal( array $params ) { |
306 | 306 | $status = Status::newGood(); |
— | — | @@ -339,7 +339,7 @@ |
340 | 340 | } |
341 | 341 | |
342 | 342 | /** |
343 | | - * @see FileBackend::doPrepareInternal() |
| 343 | + * @see FileBackendStore::doPrepareInternal() |
344 | 344 | */ |
345 | 345 | protected function doPrepareInternal( $fullCont, $dirRel, array $params ) { |
346 | 346 | $status = Status::newGood(); |
— | — | @@ -357,7 +357,7 @@ |
358 | 358 | } |
359 | 359 | |
360 | 360 | /** |
361 | | - * @see FileBackend::doSecureInternal() |
| 361 | + * @see FileBackendStore::doSecureInternal() |
362 | 362 | */ |
363 | 363 | protected function doSecureInternal( $fullCont, $dirRel, array $params ) { |
364 | 364 | $status = Status::newGood(); |
— | — | @@ -391,7 +391,7 @@ |
392 | 392 | } |
393 | 393 | |
394 | 394 | /** |
395 | | - * @see FileBackend::doCleanInternal() |
| 395 | + * @see FileBackendStore::doCleanInternal() |
396 | 396 | */ |
397 | 397 | protected function doCleanInternal( $fullCont, $dirRel, array $params ) { |
398 | 398 | $status = Status::newGood(); |
— | — | @@ -407,7 +407,7 @@ |
408 | 408 | } |
409 | 409 | |
410 | 410 | /** |
411 | | - * @see FileBackend::doFileExists() |
| 411 | + * @see FileBackendStore::doFileExists() |
412 | 412 | */ |
413 | 413 | protected function doGetFileStat( array $params ) { |
414 | 414 | $source = $this->resolveToFSPath( $params['src'] ); |
— | — | @@ -432,14 +432,14 @@ |
433 | 433 | } |
434 | 434 | |
435 | 435 | /** |
436 | | - * @see FileBackend::doClearCache() |
| 436 | + * @see FileBackendStore::doClearCache() |
437 | 437 | */ |
438 | 438 | protected function doClearCache( array $paths = null ) { |
439 | 439 | clearstatcache(); // clear the PHP file stat cache |
440 | 440 | } |
441 | 441 | |
442 | 442 | /** |
443 | | - * @see FileBackend::getFileListInternal() |
| 443 | + * @see FileBackendStore::getFileListInternal() |
444 | 444 | */ |
445 | 445 | public function getFileListInternal( $fullCont, $dirRel, array $params ) { |
446 | 446 | list( $b, $shortCont, $r ) = FileBackend::splitStoragePath( $params['dir'] ); |
— | — | @@ -461,7 +461,7 @@ |
462 | 462 | } |
463 | 463 | |
464 | 464 | /** |
465 | | - * @see FileBackend::getLocalReference() |
| 465 | + * @see FileBackendStore::getLocalReference() |
466 | 466 | */ |
467 | 467 | public function getLocalReference( array $params ) { |
468 | 468 | $source = $this->resolveToFSPath( $params['src'] ); |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | } |
474 | 474 | |
475 | 475 | /** |
476 | | - * @see FileBackend::getLocalCopy() |
| 476 | + * @see FileBackendStore::getLocalCopy() |
477 | 477 | */ |
478 | 478 | public function getLocalCopy( array $params ) { |
479 | 479 | $source = $this->resolveToFSPath( $params['src'] ); |
Index: trunk/phase3/includes/filerepo/backend/FileBackendGroup.php |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | * Get the backend object with a given name |
126 | 126 | * |
127 | 127 | * @param $name string |
128 | | - * @return FileBackendBase |
| 128 | + * @return FileBackend |
129 | 129 | * @throws MWException |
130 | 130 | */ |
131 | 131 | public function get( $name ) { |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | * Get an appropriate backend object from a storage path |
146 | 146 | * |
147 | 147 | * @param $storagePath string |
148 | | - * @return FileBackendBase|null Backend or null on failure |
| 148 | + * @return FileBackend|null Backend or null on failure |
149 | 149 | */ |
150 | 150 | public function backendFromPath( $storagePath ) { |
151 | 151 | list( $backend, $c, $p ) = FileBackend::splitStoragePath( $storagePath ); |
Index: trunk/phase3/includes/filerepo/backend/SwiftFileBackend.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | * @ingroup FileBackend |
21 | 21 | * @since 1.19 |
22 | 22 | */ |
23 | | -class SwiftFileBackend extends FileBackend { |
| 23 | +class SwiftFileBackend extends FileBackendStore { |
24 | 24 | /** @var CF_Authentication */ |
25 | 25 | protected $auth; // Swift authentication handler |
26 | 26 | protected $authTTL; // integer seconds |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | protected $connContainers = array(); // container object cache |
34 | 34 | |
35 | 35 | /** |
36 | | - * @see FileBackend::__construct() |
| 36 | + * @see FileBackendStore::__construct() |
37 | 37 | * Additional $config params include: |
38 | 38 | * swiftAuthUrl : Swift authentication server URL |
39 | 39 | * swiftUser : Swift user used by MediaWiki (account:username) |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | | - * @see FileBackend::resolveContainerPath() |
| 67 | + * @see FileBackendStore::resolveContainerPath() |
68 | 68 | */ |
69 | 69 | protected function resolveContainerPath( $container, $relStoragePath ) { |
70 | 70 | if ( strlen( urlencode( $relStoragePath ) ) > 1024 ) { |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | | - * @see FileBackend::isPathUsableInternal() |
| 77 | + * @see FileBackendStore::isPathUsableInternal() |
78 | 78 | */ |
79 | 79 | public function isPathUsableInternal( $storagePath ) { |
80 | 80 | list( $container, $rel ) = $this->resolveStoragePathReal( $storagePath ); |
— | — | @@ -94,7 +94,7 @@ |
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | | - * @see FileBackend::doCopyInternal() |
| 98 | + * @see FileBackendStore::doCopyInternal() |
99 | 99 | */ |
100 | 100 | protected function doCreateInternal( array $params ) { |
101 | 101 | $status = Status::newGood(); |
— | — | @@ -156,7 +156,7 @@ |
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
160 | | - * @see FileBackend::doStoreInternal() |
| 160 | + * @see FileBackendStore::doStoreInternal() |
161 | 161 | */ |
162 | 162 | protected function doStoreInternal( array $params ) { |
163 | 163 | $status = Status::newGood(); |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | } |
226 | 226 | |
227 | 227 | /** |
228 | | - * @see FileBackend::doCopyInternal() |
| 228 | + * @see FileBackendStore::doCopyInternal() |
229 | 229 | */ |
230 | 230 | protected function doCopyInternal( array $params ) { |
231 | 231 | $status = Status::newGood(); |
— | — | @@ -279,7 +279,7 @@ |
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
283 | | - * @see FileBackend::doDeleteInternal() |
| 283 | + * @see FileBackendStore::doDeleteInternal() |
284 | 284 | */ |
285 | 285 | protected function doDeleteInternal( array $params ) { |
286 | 286 | $status = Status::newGood(); |
— | — | @@ -310,7 +310,7 @@ |
311 | 311 | } |
312 | 312 | |
313 | 313 | /** |
314 | | - * @see FileBackend::doPrepareInternal() |
| 314 | + * @see FileBackendStore::doPrepareInternal() |
315 | 315 | */ |
316 | 316 | protected function doPrepareInternal( $fullCont, $dir, array $params ) { |
317 | 317 | $status = Status::newGood(); |
— | — | @@ -355,7 +355,7 @@ |
356 | 356 | } |
357 | 357 | |
358 | 358 | /** |
359 | | - * @see FileBackend::doSecureInternal() |
| 359 | + * @see FileBackendStore::doSecureInternal() |
360 | 360 | */ |
361 | 361 | protected function doSecureInternal( $fullCont, $dir, array $params ) { |
362 | 362 | $status = Status::newGood(); |
— | — | @@ -389,7 +389,7 @@ |
390 | 390 | } |
391 | 391 | |
392 | 392 | /** |
393 | | - * @see FileBackend::doCleanInternal() |
| 393 | + * @see FileBackendStore::doCleanInternal() |
394 | 394 | */ |
395 | 395 | protected function doCleanInternal( $fullCont, $dir, array $params ) { |
396 | 396 | $status = Status::newGood(); |
— | — | @@ -433,7 +433,7 @@ |
434 | 434 | } |
435 | 435 | |
436 | 436 | /** |
437 | | - * @see FileBackend::doFileExists() |
| 437 | + * @see FileBackendStore::doFileExists() |
438 | 438 | */ |
439 | 439 | protected function doGetFileStat( array $params ) { |
440 | 440 | list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); |
— | — | @@ -494,7 +494,7 @@ |
495 | 495 | } |
496 | 496 | |
497 | 497 | /** |
498 | | - * @see FileBackendBase::getFileContents() |
| 498 | + * @see FileBackend::getFileContents() |
499 | 499 | */ |
500 | 500 | public function getFileContents( array $params ) { |
501 | 501 | list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); |
— | — | @@ -521,7 +521,7 @@ |
522 | 522 | } |
523 | 523 | |
524 | 524 | /** |
525 | | - * @see FileBackend::getFileListInternal() |
| 525 | + * @see FileBackendStore::getFileListInternal() |
526 | 526 | */ |
527 | 527 | public function getFileListInternal( $fullCont, $dir, array $params ) { |
528 | 528 | return new SwiftFileBackendFileList( $this, $fullCont, $dir ); |
— | — | @@ -554,7 +554,7 @@ |
555 | 555 | } |
556 | 556 | |
557 | 557 | /** |
558 | | - * @see FileBackend::doGetFileSha1base36() |
| 558 | + * @see FileBackendStore::doGetFileSha1base36() |
559 | 559 | */ |
560 | 560 | public function doGetFileSha1base36( array $params ) { |
561 | 561 | $stat = $this->getFileStat( $params ); |
— | — | @@ -566,7 +566,7 @@ |
567 | 567 | } |
568 | 568 | |
569 | 569 | /** |
570 | | - * @see FileBackend::doStreamFile() |
| 570 | + * @see FileBackendStore::doStreamFile() |
571 | 571 | */ |
572 | 572 | protected function doStreamFile( array $params ) { |
573 | 573 | $status = Status::newGood(); |
— | — | @@ -592,7 +592,6 @@ |
593 | 593 | |
594 | 594 | try { |
595 | 595 | $output = fopen( 'php://output', 'w' ); |
596 | | - // FileBackend::streamFile() already checks existence |
597 | 596 | $obj = new CF_Object( $cont, $srcRel, false, false ); // skip HEAD request |
598 | 597 | $obj->stream( $output, $this->headersFromParams( $params ) ); |
599 | 598 | } catch ( InvalidResponseException $e ) { // 404? connection problem? |
— | — | @@ -606,7 +605,7 @@ |
607 | 606 | } |
608 | 607 | |
609 | 608 | /** |
610 | | - * @see FileBackend::getLocalCopy() |
| 609 | + * @see FileBackendStore::getLocalCopy() |
611 | 610 | */ |
612 | 611 | public function getLocalCopy( array $params ) { |
613 | 612 | list( $srcCont, $srcRel ) = $this->resolveStoragePathReal( $params['src'] ); |
— | — | @@ -722,7 +721,7 @@ |
723 | 722 | } |
724 | 723 | |
725 | 724 | /** |
726 | | - * @see FileBackend::doClearCache() |
| 725 | + * @see FileBackendStore::doClearCache() |
727 | 726 | */ |
728 | 727 | protected function doClearCache( array $paths = null ) { |
729 | 728 | $this->connContainers = array(); // clear container object cache |
Index: trunk/phase3/includes/filerepo/backend/FileBackend.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | * @ingroup FileBackend |
31 | 31 | * @since 1.19 |
32 | 32 | */ |
33 | | -abstract class FileBackendBase { |
| 33 | +abstract class FileBackend { |
34 | 34 | protected $name; // string; unique backend name |
35 | 35 | protected $wikiId; // string; unique wiki name |
36 | 36 | protected $readOnly; // string; read-only explanation message |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
174 | | - * @see FileBackendBase::doOperations() |
| 174 | + * @see FileBackend::doOperations() |
175 | 175 | */ |
176 | 176 | abstract protected function doOperationsInternal( array $ops, array $opts ); |
177 | 177 | |
— | — | @@ -179,7 +179,7 @@ |
180 | 180 | * If you are doing a batch of operations that should either |
181 | 181 | * all succeed or all fail, then use that function instead. |
182 | 182 | * |
183 | | - * @see FileBackendBase::doOperations() |
| 183 | + * @see FileBackend::doOperations() |
184 | 184 | * |
185 | 185 | * @param $op Array Operation |
186 | 186 | * @param $opts Array Operation options |
— | — | @@ -193,7 +193,7 @@ |
194 | 194 | * Performs a single create operation. |
195 | 195 | * This sets $params['op'] to 'create' and passes it to doOperation(). |
196 | 196 | * |
197 | | - * @see FileBackendBase::doOperation() |
| 197 | + * @see FileBackend::doOperation() |
198 | 198 | * |
199 | 199 | * @param $params Array Operation parameters |
200 | 200 | * @param $opts Array Operation options |
— | — | @@ -208,7 +208,7 @@ |
209 | 209 | * Performs a single store operation. |
210 | 210 | * This sets $params['op'] to 'store' and passes it to doOperation(). |
211 | 211 | * |
212 | | - * @see FileBackendBase::doOperation() |
| 212 | + * @see FileBackend::doOperation() |
213 | 213 | * |
214 | 214 | * @param $params Array Operation parameters |
215 | 215 | * @param $opts Array Operation options |
— | — | @@ -223,7 +223,7 @@ |
224 | 224 | * Performs a single copy operation. |
225 | 225 | * This sets $params['op'] to 'copy' and passes it to doOperation(). |
226 | 226 | * |
227 | | - * @see FileBackendBase::doOperation() |
| 227 | + * @see FileBackend::doOperation() |
228 | 228 | * |
229 | 229 | * @param $params Array Operation parameters |
230 | 230 | * @param $opts Array Operation options |
— | — | @@ -238,7 +238,7 @@ |
239 | 239 | * Performs a single move operation. |
240 | 240 | * This sets $params['op'] to 'move' and passes it to doOperation(). |
241 | 241 | * |
242 | | - * @see FileBackendBase::doOperation() |
| 242 | + * @see FileBackend::doOperation() |
243 | 243 | * |
244 | 244 | * @param $params Array Operation parameters |
245 | 245 | * @param $opts Array Operation options |
— | — | @@ -253,7 +253,7 @@ |
254 | 254 | * Performs a single delete operation. |
255 | 255 | * This sets $params['op'] to 'delete' and passes it to doOperation(). |
256 | 256 | * |
257 | | - * @see FileBackendBase::doOperation() |
| 257 | + * @see FileBackend::doOperation() |
258 | 258 | * |
259 | 259 | * @param $params Array Operation parameters |
260 | 260 | * @param $opts Array Operation options |
— | — | @@ -297,7 +297,7 @@ |
298 | 298 | } |
299 | 299 | |
300 | 300 | /** |
301 | | - * @see FileBackendBase::prepare() |
| 301 | + * @see FileBackend::prepare() |
302 | 302 | */ |
303 | 303 | abstract protected function doPrepare( array $params ); |
304 | 304 | |
— | — | @@ -328,7 +328,7 @@ |
329 | 329 | } |
330 | 330 | |
331 | 331 | /** |
332 | | - * @see FileBackendBase::secure() |
| 332 | + * @see FileBackend::secure() |
333 | 333 | */ |
334 | 334 | abstract protected function doSecure( array $params ); |
335 | 335 | |
— | — | @@ -351,7 +351,7 @@ |
352 | 352 | } |
353 | 353 | |
354 | 354 | /** |
355 | | - * @see FileBackendBase::clean() |
| 355 | + * @see FileBackend::clean() |
356 | 356 | */ |
357 | 357 | abstract protected function doClean( array $params ); |
358 | 358 | |
— | — | @@ -681,14 +681,14 @@ |
682 | 682 | * This class defines the methods as abstract that subclasses must implement. |
683 | 683 | * Outside callers should *not* use functions with "Internal" in the name. |
684 | 684 | * |
685 | | - * The FileBackendBase operations are implemented using basic functions |
| 685 | + * The FileBackend operations are implemented using basic functions |
686 | 686 | * such as storeInternal(), copyInternal(), deleteInternal() and the like. |
687 | 687 | * This class is also responsible for path resolution and sanitization. |
688 | 688 | * |
689 | 689 | * @ingroup FileBackend |
690 | 690 | * @since 1.19 |
691 | 691 | */ |
692 | | -abstract class FileBackend extends FileBackendBase { |
| 692 | +abstract class FileBackendStore extends FileBackend { |
693 | 693 | /** @var Array Map of paths to small (RAM/disk) cache items */ |
694 | 694 | protected $cache = array(); // (storage path => key => value) |
695 | 695 | protected $maxCacheSize = 100; // integer; max paths with entries |
— | — | @@ -747,7 +747,7 @@ |
748 | 748 | } |
749 | 749 | |
750 | 750 | /** |
751 | | - * @see FileBackend::createInternal() |
| 751 | + * @see FileBackendStore::createInternal() |
752 | 752 | */ |
753 | 753 | abstract protected function doCreateInternal( array $params ); |
754 | 754 | |
— | — | @@ -776,7 +776,7 @@ |
777 | 777 | } |
778 | 778 | |
779 | 779 | /** |
780 | | - * @see FileBackend::storeInternal() |
| 780 | + * @see FileBackendStore::storeInternal() |
781 | 781 | */ |
782 | 782 | abstract protected function doStoreInternal( array $params ); |
783 | 783 | |
— | — | @@ -801,7 +801,7 @@ |
802 | 802 | } |
803 | 803 | |
804 | 804 | /** |
805 | | - * @see FileBackend::copyInternal() |
| 805 | + * @see FileBackendStore::copyInternal() |
806 | 806 | */ |
807 | 807 | abstract protected function doCopyInternal( array $params ); |
808 | 808 | |
— | — | @@ -825,7 +825,7 @@ |
826 | 826 | } |
827 | 827 | |
828 | 828 | /** |
829 | | - * @see FileBackend::deleteInternal() |
| 829 | + * @see FileBackendStore::deleteInternal() |
830 | 830 | */ |
831 | 831 | abstract protected function doDeleteInternal( array $params ); |
832 | 832 | |
— | — | @@ -850,7 +850,7 @@ |
851 | 851 | } |
852 | 852 | |
853 | 853 | /** |
854 | | - * @see FileBackend::moveInternal() |
| 854 | + * @see FileBackendStore::moveInternal() |
855 | 855 | */ |
856 | 856 | protected function doMoveInternal( array $params ) { |
857 | 857 | // Copy source to dest |
— | — | @@ -864,7 +864,7 @@ |
865 | 865 | } |
866 | 866 | |
867 | 867 | /** |
868 | | - * @see FileBackendBase::concatenate() |
| 868 | + * @see FileBackend::concatenate() |
869 | 869 | */ |
870 | 870 | final public function concatenate( array $params ) { |
871 | 871 | wfProfileIn( __METHOD__ ); |
— | — | @@ -882,7 +882,7 @@ |
883 | 883 | } |
884 | 884 | |
885 | 885 | /** |
886 | | - * @see FileBackend::concatenate() |
| 886 | + * @see FileBackendStore::concatenate() |
887 | 887 | */ |
888 | 888 | protected function doConcatenate( array $params ) { |
889 | 889 | $status = Status::newGood(); |
— | — | @@ -937,7 +937,7 @@ |
938 | 938 | } |
939 | 939 | |
940 | 940 | /** |
941 | | - * @see FileBackendBase::doPrepare() |
| 941 | + * @see FileBackend::doPrepare() |
942 | 942 | */ |
943 | 943 | final protected function doPrepare( array $params ) { |
944 | 944 | wfProfileIn( __METHOD__ ); |
— | — | @@ -965,14 +965,14 @@ |
966 | 966 | } |
967 | 967 | |
968 | 968 | /** |
969 | | - * @see FileBackend::doPrepare() |
| 969 | + * @see FileBackendStore::doPrepare() |
970 | 970 | */ |
971 | 971 | protected function doPrepareInternal( $container, $dir, array $params ) { |
972 | 972 | return Status::newGood(); |
973 | 973 | } |
974 | 974 | |
975 | 975 | /** |
976 | | - * @see FileBackendBase::doSecure() |
| 976 | + * @see FileBackend::doSecure() |
977 | 977 | */ |
978 | 978 | final protected function doSecure( array $params ) { |
979 | 979 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1000,14 +1000,14 @@ |
1001 | 1001 | } |
1002 | 1002 | |
1003 | 1003 | /** |
1004 | | - * @see FileBackend::doSecure() |
| 1004 | + * @see FileBackendStore::doSecure() |
1005 | 1005 | */ |
1006 | 1006 | protected function doSecureInternal( $container, $dir, array $params ) { |
1007 | 1007 | return Status::newGood(); |
1008 | 1008 | } |
1009 | 1009 | |
1010 | 1010 | /** |
1011 | | - * @see FileBackendBase::doClean() |
| 1011 | + * @see FileBackend::doClean() |
1012 | 1012 | */ |
1013 | 1013 | final protected function doClean( array $params ) { |
1014 | 1014 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1043,14 +1043,14 @@ |
1044 | 1044 | } |
1045 | 1045 | |
1046 | 1046 | /** |
1047 | | - * @see FileBackend::doClean() |
| 1047 | + * @see FileBackendStore::doClean() |
1048 | 1048 | */ |
1049 | 1049 | protected function doCleanInternal( $container, $dir, array $params ) { |
1050 | 1050 | return Status::newGood(); |
1051 | 1051 | } |
1052 | 1052 | |
1053 | 1053 | /** |
1054 | | - * @see FileBackendBase::fileExists() |
| 1054 | + * @see FileBackend::fileExists() |
1055 | 1055 | */ |
1056 | 1056 | final public function fileExists( array $params ) { |
1057 | 1057 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1060,7 +1060,7 @@ |
1061 | 1061 | } |
1062 | 1062 | |
1063 | 1063 | /** |
1064 | | - * @see FileBackendBase::getFileTimestamp() |
| 1064 | + * @see FileBackend::getFileTimestamp() |
1065 | 1065 | */ |
1066 | 1066 | final public function getFileTimestamp( array $params ) { |
1067 | 1067 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1070,7 +1070,7 @@ |
1071 | 1071 | } |
1072 | 1072 | |
1073 | 1073 | /** |
1074 | | - * @see FileBackendBase::getFileSize() |
| 1074 | + * @see FileBackend::getFileSize() |
1075 | 1075 | */ |
1076 | 1076 | final public function getFileSize( array $params ) { |
1077 | 1077 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1080,7 +1080,7 @@ |
1081 | 1081 | } |
1082 | 1082 | |
1083 | 1083 | /** |
1084 | | - * @see FileBackendBase::getFileStat() |
| 1084 | + * @see FileBackend::getFileStat() |
1085 | 1085 | */ |
1086 | 1086 | final public function getFileStat( array $params ) { |
1087 | 1087 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1108,12 +1108,12 @@ |
1109 | 1109 | } |
1110 | 1110 | |
1111 | 1111 | /** |
1112 | | - * @see FileBackend::getFileStat() |
| 1112 | + * @see FileBackendStore::getFileStat() |
1113 | 1113 | */ |
1114 | 1114 | abstract protected function doGetFileStat( array $params ); |
1115 | 1115 | |
1116 | 1116 | /** |
1117 | | - * @see FileBackendBase::getFileContents() |
| 1117 | + * @see FileBackend::getFileContents() |
1118 | 1118 | */ |
1119 | 1119 | public function getFileContents( array $params ) { |
1120 | 1120 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1130,7 +1130,7 @@ |
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | /** |
1134 | | - * @see FileBackendBase::getFileSha1Base36() |
| 1134 | + * @see FileBackend::getFileSha1Base36() |
1135 | 1135 | */ |
1136 | 1136 | final public function getFileSha1Base36( array $params ) { |
1137 | 1137 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1149,7 +1149,7 @@ |
1150 | 1150 | } |
1151 | 1151 | |
1152 | 1152 | /** |
1153 | | - * @see FileBackend::getFileSha1Base36() |
| 1153 | + * @see FileBackendStore::getFileSha1Base36() |
1154 | 1154 | */ |
1155 | 1155 | protected function doGetFileSha1Base36( array $params ) { |
1156 | 1156 | $fsFile = $this->getLocalReference( $params ); |
— | — | @@ -1161,7 +1161,7 @@ |
1162 | 1162 | } |
1163 | 1163 | |
1164 | 1164 | /** |
1165 | | - * @see FileBackendBase::getFileProps() |
| 1165 | + * @see FileBackend::getFileProps() |
1166 | 1166 | */ |
1167 | 1167 | final public function getFileProps( array $params ) { |
1168 | 1168 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1172,7 +1172,7 @@ |
1173 | 1173 | } |
1174 | 1174 | |
1175 | 1175 | /** |
1176 | | - * @see FileBackendBase::getLocalReference() |
| 1176 | + * @see FileBackend::getLocalReference() |
1177 | 1177 | */ |
1178 | 1178 | public function getLocalReference( array $params ) { |
1179 | 1179 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1191,7 +1191,7 @@ |
1192 | 1192 | } |
1193 | 1193 | |
1194 | 1194 | /** |
1195 | | - * @see FileBackendBase::streamFile() |
| 1195 | + * @see FileBackend::streamFile() |
1196 | 1196 | */ |
1197 | 1197 | final public function streamFile( array $params ) { |
1198 | 1198 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1218,7 +1218,7 @@ |
1219 | 1219 | } |
1220 | 1220 | |
1221 | 1221 | /** |
1222 | | - * @see FileBackend::streamFile() |
| 1222 | + * @see FileBackendStore::streamFile() |
1223 | 1223 | */ |
1224 | 1224 | protected function doStreamFile( array $params ) { |
1225 | 1225 | $status = Status::newGood(); |
— | — | @@ -1234,7 +1234,7 @@ |
1235 | 1235 | } |
1236 | 1236 | |
1237 | 1237 | /** |
1238 | | - * @see FileBackendBase::getFileList() |
| 1238 | + * @see FileBackend::getFileList() |
1239 | 1239 | */ |
1240 | 1240 | final public function getFileList( array $params ) { |
1241 | 1241 | list( $fullCont, $dir, $shard ) = $this->resolveStoragePath( $params['dir'] ); |
— | — | @@ -1248,7 +1248,7 @@ |
1249 | 1249 | wfDebug( __METHOD__ . ": iterating over all container shards.\n" ); |
1250 | 1250 | // File listing spans multiple containers/shards |
1251 | 1251 | list( $b, $shortCont, $r ) = self::splitStoragePath( $params['dir'] ); |
1252 | | - return new FileBackendShardListIterator( $this, |
| 1252 | + return new FileBackendStoreShardListIterator( $this, |
1253 | 1253 | $fullCont, $dir, $this->getContainerSuffixes( $shortCont ), $params ); |
1254 | 1254 | } |
1255 | 1255 | } |
— | — | @@ -1256,7 +1256,7 @@ |
1257 | 1257 | /** |
1258 | 1258 | * Do not call this function from places outside FileBackend |
1259 | 1259 | * |
1260 | | - * @see FileBackend::getFileList() |
| 1260 | + * @see FileBackendStore::getFileList() |
1261 | 1261 | * |
1262 | 1262 | * @param $container string Resolved container name |
1263 | 1263 | * @param $dir string Resolved path relative to container |
— | — | @@ -1314,7 +1314,7 @@ |
1315 | 1315 | } |
1316 | 1316 | |
1317 | 1317 | /** |
1318 | | - * @see FileBackendBase::doOperationsInternal() |
| 1318 | + * @see FileBackend::doOperationsInternal() |
1319 | 1319 | */ |
1320 | 1320 | protected function doOperationsInternal( array $ops, array $opts ) { |
1321 | 1321 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1359,7 +1359,7 @@ |
1360 | 1360 | } |
1361 | 1361 | |
1362 | 1362 | /** |
1363 | | - * @see FileBackendBase::clearCache() |
| 1363 | + * @see FileBackend::clearCache() |
1364 | 1364 | */ |
1365 | 1365 | final public function clearCache( array $paths = null ) { |
1366 | 1366 | if ( is_array( $paths ) ) { |
— | — | @@ -1381,7 +1381,7 @@ |
1382 | 1382 | /** |
1383 | 1383 | * Clears any additional stat caches for storage paths |
1384 | 1384 | * |
1385 | | - * @see FileBackendBase::clearCache() |
| 1385 | + * @see FileBackend::clearCache() |
1386 | 1386 | * |
1387 | 1387 | * @param $paths Array Storage paths (optional) |
1388 | 1388 | * @return void |
— | — | @@ -1469,7 +1469,7 @@ |
1470 | 1470 | * Like resolveStoragePath() except null values are returned if |
1471 | 1471 | * the container is sharded and the shard could not be determined. |
1472 | 1472 | * |
1473 | | - * @see FileBackend::resolveStoragePath() |
| 1473 | + * @see FileBackendStore::resolveStoragePath() |
1474 | 1474 | * |
1475 | 1475 | * @param $storagePath string |
1476 | 1476 | * @return Array (container, path) or (null, null) if invalid |
— | — | @@ -1587,13 +1587,13 @@ |
1588 | 1588 | } |
1589 | 1589 | |
1590 | 1590 | /** |
1591 | | - * FileBackend helper function to handle file listings that span container shards. |
1592 | | - * Do not use this class from places outside of FileBackend. |
| 1591 | + * FileBackendStore helper function to handle file listings that span container shards. |
| 1592 | + * Do not use this class from places outside of FileBackendStore. |
1593 | 1593 | * |
1594 | | - * @ingroup FileBackend |
| 1594 | + * @ingroup FileBackendStore |
1595 | 1595 | */ |
1596 | | -class FileBackendShardListIterator implements Iterator { |
1597 | | - /* @var FileBackend */ |
| 1596 | +class FileBackendStoreShardListIterator implements Iterator { |
| 1597 | + /* @var FileBackendStore */ |
1598 | 1598 | protected $backend; |
1599 | 1599 | /* @var Array */ |
1600 | 1600 | protected $params; |
— | — | @@ -1608,14 +1608,14 @@ |
1609 | 1609 | protected $pos = 0; // integer |
1610 | 1610 | |
1611 | 1611 | /** |
1612 | | - * @param $backend FileBackend |
| 1612 | + * @param $backend FileBackendStore |
1613 | 1613 | * @param $container string Full storage container name |
1614 | 1614 | * @param $dir string Storage directory relative to container |
1615 | 1615 | * @param $suffixes Array List of container shard suffixes |
1616 | 1616 | * @param $params Array |
1617 | 1617 | */ |
1618 | 1618 | public function __construct( |
1619 | | - FileBackend $backend, $container, $dir, array $suffixes, array $params |
| 1619 | + FileBackendStore $backend, $container, $dir, array $suffixes, array $params |
1620 | 1620 | ) { |
1621 | 1621 | $this->backend = $backend; |
1622 | 1622 | $this->container = $container; |
Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | const OVERWRITE_SAME = 4; |
21 | 21 | const SKIP_LOCKING = 8; |
22 | 22 | |
23 | | - /** @var FileBackendBase */ |
| 23 | + /** @var FileBackend */ |
24 | 24 | protected $backend; |
25 | 25 | /** @var Array Map of zones to config */ |
26 | 26 | protected $zones = array(); |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | |
53 | 53 | // Required settings |
54 | 54 | $this->name = $info['name']; |
55 | | - if ( $info['backend'] instanceof FileBackendBase ) { |
| 55 | + if ( $info['backend'] instanceof FileBackend ) { |
56 | 56 | $this->backend = $info['backend']; // useful for testing |
57 | 57 | } else { |
58 | 58 | $this->backend = FileBackendGroup::singleton()->get( $info['backend'] ); |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | /** |
107 | 107 | * Get the file backend instance |
108 | 108 | * |
109 | | - * @return FileBackendBase |
| 109 | + * @return FileBackend |
110 | 110 | */ |
111 | 111 | public function getBackend() { |
112 | 112 | return $this->backend; |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -494,10 +494,10 @@ |
495 | 495 | |
496 | 496 | # includes/filerepo/backend |
497 | 497 | 'FileBackendGroup' => 'includes/filerepo/backend/FileBackendGroup.php', |
498 | | - 'FileBackendBase' => 'includes/filerepo/backend/FileBackend.php', |
499 | 498 | 'FileBackend' => 'includes/filerepo/backend/FileBackend.php', |
| 499 | + 'FileBackendStore' => 'includes/filerepo/backend/FileBackend.php', |
500 | 500 | 'FileBackendMultiWrite' => 'includes/filerepo/backend/FileBackendMultiWrite.php', |
501 | | - 'FileBackendShardListIterator' => 'includes/filerepo/backend/FileBackend.php', |
| 501 | + 'FileBackendStoreShardListIterator' => 'includes/filerepo/backend/FileBackend.php', |
502 | 502 | 'FSFileBackend' => 'includes/filerepo/backend/FSFileBackend.php', |
503 | 503 | 'FSFileBackendFileList' => 'includes/filerepo/backend/FSFileBackend.php', |
504 | 504 | 'SwiftFileBackend' => 'includes/filerepo/backend/SwiftFileBackend.php', |
Index: trunk/extensions/WindowsAzureStorage/includes/filerepo/backend/WindowsAzureFileBackend.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | * |
24 | 24 | * @ingroup FileBackend |
25 | 25 | */ |
26 | | -class WindowsAzureFileBackend extends FileBackend { |
| 26 | +class WindowsAzureFileBackend extends FileBackendStore { |
27 | 27 | |
28 | 28 | /** @var Microsoft_WindowsAzure_Storage_Blob */ |
29 | 29 | protected $storageClient = null; |