]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/index/class_BaseIndex.php
This getter needs also to be public and be called through iterator.
[core.git] / inc / classes / main / index / class_BaseIndex.php
index 016aa3f5ec8680355b404d29920cefcfa2b61f3f..adbb71608c459bf3eac4f88657ae5b297a8d5083 100644 (file)
@@ -115,7 +115,7 @@ class BaseIndex extends BaseFrameworkSystem {
                        chr(BaseFile::SEPARATOR_HEADER_DATA),
 
                        // Total entries
                        chr(BaseFile::SEPARATOR_HEADER_DATA),
 
                        // Total entries
-                       str_pad($this->dec2hex($this->getCounter()), BaseFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
+                       str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
 
                        // Separator header<->entries
                        chr(BaseFile::SEPARATOR_HEADER_ENTRIES)
 
                        // Separator header<->entries
                        chr(BaseFile::SEPARATOR_HEADER_ENTRIES)
@@ -285,6 +285,17 @@ class BaseIndex extends BaseFrameworkSystem {
        public function updateSeekPosition () {
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
        public function updateSeekPosition () {
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
+
+       /**
+        * Getter for total entries
+        *
+        * @return      $totalEntries   Total entries in this file
+        * @throws      UnsupportedOperationException   This method is not (and maybe never will be) supported
+        */
+       public final function getCounter () {
+               throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getPointerInstance()), self::EXCEPTION_UNSPPORTED_OPERATION);
+       }
+
 }
 
 // [EOF]
 }
 
 // [EOF]