[FileBackend] Renamed getOperations() to reflect that it is "internal".
authorAaron Schulz <aschulz@wikimedia.org>
Tue, 24 Apr 2012 10:55:11 +0000 (03:55 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 24 Apr 2012 10:55:11 +0000 (03:55 -0700)
Change-Id: I11e1b1b3ad494280f753d517792dcd1dff400aa6

includes/filerepo/backend/FileBackendMultiWrite.php
includes/filerepo/backend/FileBackendStore.php

index 9c3cf5b..1f084d1 100644 (file)
@@ -7,7 +7,7 @@
 
 /**
  * @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.
@@ -93,7 +93,8 @@ class FileBackendMultiWrite extends FileBackend {
                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.
@@ -220,7 +221,7 @@ class FileBackendMultiWrite extends FileBackend {
        /**
         * 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
@@ -241,7 +242,7 @@ class FileBackendMultiWrite extends FileBackend {
 
        /**
         * Same as substOpBatchPaths() but for a single operation
-        * 
+        *
         * @param $op File operation array
         * @param $backend FileBackendStore
         * @return Array
@@ -253,7 +254,7 @@ class FileBackendMultiWrite extends FileBackend {
 
        /**
         * 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
@@ -268,7 +269,7 @@ class FileBackendMultiWrite extends FileBackend {
 
        /**
         * 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
         */
index 55dedc1..57654e7 100644 (file)
@@ -705,7 +705,7 @@ abstract class FileBackendStore extends FileBackend {
         * @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
@@ -719,7 +719,7 @@ abstract class FileBackendStore extends FileBackend {
                                // 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." );
                        }
                }
 
@@ -736,7 +736,7 @@ abstract class FileBackendStore extends FileBackend {
                $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'] ) ) {