]> git.mxchange.org Git - core.git/commitdiff
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 674fc6269d7d1c9f4319b7dd5de6bddb348b0d6d..3bb0d8160c6ee60f6833e68854fa57102641e3fc 100644 (file)
@@ -139,6 +139,13 @@ interface SeekableWritableFileIterator extends SeekableIterator {
         * @return      $totalEntries   Total entries in this file
         */
        function getCounter ();
         * @return      $totalEntries   Total entries in this file
         */
        function getCounter ();
+
+       /**
+        * "Getter" for file size
+        *
+        * @return      $fileSize       Size of currently loaded file
+        */
+       function getFileSize ();
 }
 
 // [EOF]
 }
 
 // [EOF]
index b40ef6b4d6a271f719f0c86d17f0b29736961d52..e73360746691268788d78cd90610ab29847ef394 100644 (file)
@@ -268,6 +268,16 @@ class FileIterator extends BaseIterator implements SeekableWritableFileIterator
                // Call block instance
                return $this->getBlockInstance()->getCounter();
        }
                // 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]
 }
 
 // [EOF]
index 6b50a6e0d934b81b3c0d434972dcdfa5c00d3452..a07d503422dc75628716b3879314734952310ca3 100644 (file)
@@ -491,6 +491,15 @@ class BaseFileStack extends BaseStacker {
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 
                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]
 }
 
 // [EOF]