Also add getFileSize() here, too. This satisfies the interface.
authorRoland Haeder <roland@mxchange.org>
Wed, 4 Jun 2014 21:24:55 +0000 (23:24 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 4 Jun 2014 21:24:55 +0000 (23:24 +0200)
Signed-off-by: Roland H├Ąder <roland@mxchange.org>
inc/classes/interfaces/iterator/class_SeekableWritableFileIterator.php
inc/classes/main/iterator/file/class_FileIterator.php
inc/classes/main/stacker/file/class_BaseFileStack.php

index 674fc62..3bb0d81 100644 (file)
@@ -139,6 +139,13 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @return      $totalEntries   Total entries in this file
         */
        function getCounter ();
+
+       /**
+        * "Getter" for file size
+        *
+        * @return      $fileSize       Size of currently loaded file
+        */
+       function getFileSize ();
 }
 
 // [EOF]
index b40ef6b..e733607 100644 (file)
@@ -268,6 +268,16 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
                // Call block instance
                return $this->getBlockInstance()->getCounter();
        }
+
+       /**
+        * "Getter" for file size
+        *
+        * @return      $fileSize       Size of currently loaded file
+        */
+       public function getFileSize () {
+               // Call block instance
+               return $this->getBlockInstance()->getFileSize();
+       }
 }
 
 // [EOF]
index 6b50a6e..a07d503 100644 (file)
@@ -491,6 +491,15 @@ class BaseFileStack extends BaseStacker {
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
+       /**
+        * "Getter" for file size
+        *
+        * @return      $fileSize       Size of currently loaded file
+        */
+       public function getFileSize () {
+               // Call iterator's method
+               return $this->getIteratorInstance()->getFileSize();
+       }
 }
 
 // [EOF]