X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Findex%2Fclass_BaseIndex.php;h=adbb71608c459bf3eac4f88657ae5b297a8d5083;hp=016aa3f5ec8680355b404d29920cefcfa2b61f3f;hb=202f8c1c1d46d1292918b7110547952446a53391;hpb=dd2935c1e126e5b2bfc7e222afea4a47a81ed2c6 diff --git a/inc/classes/main/index/class_BaseIndex.php b/inc/classes/main/index/class_BaseIndex.php index 016aa3f5..adbb7160 100644 --- a/inc/classes/main/index/class_BaseIndex.php +++ b/inc/classes/main/index/class_BaseIndex.php @@ -115,7 +115,7 @@ class BaseIndex extends BaseFrameworkSystem { 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) @@ -285,6 +285,17 @@ class BaseIndex extends BaseFrameworkSystem { 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]