]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/index/class_BaseIndex.php
Removed duplicate methods.
[core.git] / inc / classes / main / index / class_BaseIndex.php
index 046ec73613b8910e413be723767eff1d7ae4a2d8..ea2484b0a306aae676d415b5bffd6291ff3e0ac5 100644 (file)
@@ -54,6 +54,9 @@ class BaseIndex extends BaseFrameworkSystem {
                        self::LENGTH_COUNT +
                        strlen(self::SEPARATOR_HEADER_ENTRIES)
                );
+
+               // Init counters and gaps array
+               $this->initCountersGapsArray();
        }
 
        /**
@@ -113,40 +116,6 @@ class BaseIndex extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
        }
 
-       /**
-        * Checks whether the file header is initialized
-        *
-        * @return      $isInitialized  Whether the file header is initialized
-        */
-       private function isFileHeaderInitialized () {
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
-               // Default is not initialized
-               $isInitialized = FALSE;
-
-               // Is the file initialized?
-               if ($this->isFileInitialized()) {
-                       // Some bytes has been written, so rewind to start of it.
-                       $rewindStatus = $this->getIteratorInstance()->rewind();
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] rewindStatus=%s', __METHOD__, __LINE__, $rewindStatus));
-
-                       // Is the rewind() call successfull?
-                       if ($rewindStatus != 1) {
-                               // Something bad happened
-                               self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Could not rewind().', __METHOD__, __LINE__));
-                       } // END - if
-
-                       // Read file header
-                       $this->readFileHeader();
-
-                       // The above method does already check the header
-                       $isInitialized = TRUE;
-               } // END - if
-
-               // Return result
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] isInitialized=%d - EXIT!', __METHOD__, __LINE__, intval($isInitialized)));
-               return $isInitialized;
-       }
-
        /**
         * Flushes the file header
         *