[FileBackend] Added chaining ability to some TempFSFile methods.
authorAaron Schulz <aschulz@wikimedia.org>
Mon, 15 Oct 2012 17:55:36 +0000 (10:55 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 16 Oct 2012 17:30:32 +0000 (10:30 -0700)
Change-Id: I2700e4def08e58fc0bcfb709de6ce67569820fa0

includes/filebackend/TempFSFile.php

index 2e45093..11e125c 100644 (file)
@@ -82,7 +82,7 @@ class TempFSFile extends FSFile {
         * Clean up the temporary file only after an object goes out of scope
         *
         * @param $object Object
-        * @return void
+        * @return TempFSFile This object
         */
        public function bind( $object ) {
                if ( is_object( $object ) ) {
@@ -92,24 +92,27 @@ class TempFSFile extends FSFile {
                        }
                        $object->tempFSFileReferences[] = $this;
                }
+               return $this;
        }
 
        /**
         * Set flag to not clean up after the temporary file
         *
-        * @return void
+        * @return TempFSFile This object
         */
        public function preserve() {
                $this->canDelete = false;
+               return $this;
        }
 
        /**
         * Set flag clean up after the temporary file
         *
-        * @return void
+        * @return TempFSFile This object
         */
        public function autocollect() {
                $this->canDelete = true;
+               return $this;
        }
 
        /**