]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/index/class_BaseIndex.php
Moved more code to BaseFile as it makes sense to have it there.
[core.git] / inc / classes / main / index / class_BaseIndex.php
index fd57724131a179bf518a159ad54e7d141684ef75..8347af67f64bd8948020d0e4a425d48aca3012a0 100644 (file)
@@ -54,7 +54,7 @@ class BaseIndex extends BaseFrameworkSystem {
         *
         * @return      void
         */
-       protected function readFileHeader () {
+       public function readFileHeader () {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // First rewind to beginning as the header sits at the beginning ...
@@ -114,7 +114,7 @@ class BaseIndex extends BaseFrameworkSystem {
         *
         * @return      void
         */
-       protected function flushFileHeader () {
+       public function flushFileHeader () {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
 
                // Put all informations together
@@ -162,12 +162,12 @@ class BaseIndex extends BaseFrameworkSystem {
                $this->setIteratorInstance($iteratorInstance);
 
                // Is the file's header initialized?
-               if (!$this->isFileHeaderInitialized()) {
+               if (!$this->getIteratorInstance()->isFileHeaderInitialized()) {
                        // No, then create it (which may pre-allocate the index)
-                       $this->createFileHeader();
+                       $this->getIteratorInstance()->createFileHeader();
 
                        // And pre-allocate a bit
-                       $this->preAllocateFile('index');
+                       $this->getIteratorInstance()->preAllocateFile('index');
                } // END - if
 
                // Load the file header
@@ -182,7 +182,7 @@ class BaseIndex extends BaseFrameworkSystem {
         *
         * @return      $length         Minimum length for one entry/block
         */
-       public function caluclateMinimumBlockLength () {
+       public function calculateMinimumBlockLength () {
                // Calulcate it
                // @TODO Not finished yet
                $length = 0;