Merge "CologneBlue rewrite: rewrite bottomLinks()"
[lhc/web/wiklou.git] / includes / filebackend / FileBackend.php
index 364f218..e01bfc2 100644 (file)
@@ -128,6 +128,17 @@ abstract class FileBackend {
                return $this->name;
        }
 
+       /**
+        * Get the wiki identifier used for this backend (possibly empty).
+        * Note that this might *not* be in the same format as wfWikiID().
+        *
+        * @return string
+        * @since 1.20
+        */
+       final public function getWikiId() {
+               return $this->wikiId;
+       }
+
        /**
         * Check if this backend is read-only
         *
@@ -195,6 +206,7 @@ abstract class FileBackend {
         *         'dst'                 => <storage path>,
         *         'overwrite'           => <boolean>,
         *         'overwriteSame'       => <boolean>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
         *         'disposition'         => <Content-Disposition header value>
         *     )
         * @endcode
@@ -207,6 +219,7 @@ abstract class FileBackend {
         *         'dst'                 => <storage path>,
         *         'overwrite'           => <boolean>,
         *         'overwriteSame'       => <boolean>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
         *         'disposition'         => <Content-Disposition header value>
         *     )
         * @endcode
@@ -416,6 +429,7 @@ abstract class FileBackend {
         *         'op'                  => 'copy',
         *         'src'                 => <storage path>,
         *         'dst'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
         *         'disposition'         => <Content-Disposition header value>
         *     )
         * @endcode
@@ -425,6 +439,7 @@ abstract class FileBackend {
         *         'op'                  => 'move',
         *         'src'                 => <storage path>,
         *         'dst'                 => <storage path>,
+        *         'ignoreMissingSource' => <boolean>, # since 1.21
         *         'disposition'         => <Content-Disposition header value>
         *     )
         * @endcode
@@ -573,8 +588,9 @@ abstract class FileBackend {
         *
         * @param $params Array Operation parameters
         * $params include:
-        *   - srcs : ordered source storage paths (e.g. chunk1, chunk2, ...)
-        *   - dst  : file system path to 0-byte temp file
+        *   - srcs        : ordered source storage paths (e.g. chunk1, chunk2, ...)
+        *   - dst         : file system path to 0-byte temp file
+        *   - parallelize : try to do operations in parallel when possible
         * @return Status
         */
        abstract public function concatenate( array $params );
@@ -1061,6 +1077,17 @@ abstract class FileBackend {
                return "mwstore://{$this->name}";
        }
 
+       /**
+        * Get the storage path for the given container for this backend
+        *
+        * @param $container string Container name
+        * @return string Storage path
+        * @since 1.21
+        */
+       final public function getContainerStoragePath( $container ) {
+               return $this->getRootStoragePath() . "/{$container}";
+       }
+
        /**
         * Get the file journal object for this backend
         *
@@ -1165,6 +1192,7 @@ abstract class FileBackend {
         *
         * @param $type string One of (attachment, inline)
         * @param $filename string Suggested file name (should not contain slashes)
+        * @throws MWException
         * @return string
         * @since 1.20
         */