]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/stacker/file/class_BaseFileStack.php
Moved some code to BaseFrameworkSystem, and yes: getBlockSeparator() looks stupid...
[core.git] / inc / classes / main / stacker / file / class_BaseFileStack.php
index f6819a02deb9b5b2f8870409e121d0e72682adbb..1ceda761f28f0522a590fce0aa5ba5c8c381b0b6 100644 (file)
@@ -27,26 +27,6 @@ class BaseFileStack extends BaseStacker {
         */
        const STACK_MAGIC = 'STACKv0.1';
 
-       /**
-        * Separator for header data
-        */
-       const SEPARATOR_HEADER_DATA = 0x01;
-
-       /**
-        * Separator header->entries
-        */
-       const SEPARATOR_HEADER_ENTRIES = 0x02;
-
-       /**
-        * Separator hash->name
-        */
-       const SEPARATOR_HASH_NAME = 0x03;
-
-       /**
-        * Length of name
-        */
-       const LENGTH_NAME = 10;
-
        /**
         * Protected constructor
         *
@@ -253,19 +233,6 @@ class BaseFileStack extends BaseStacker {
                $this->setIndexInstance($indexInstance);
        }
 
-       /**
-        * Calculates minimum length for one entry/block
-        *
-        * @return      $length         Minimum length for one entry/block
-        */
-       public function caluclateMinimumBlockLength () {
-               // Calulcate it
-               $length = self::getHashLength() + strlen(self::SEPARATOR_HASH_NAME) + self::LENGTH_NAME + 1;
-
-               // Return it
-               return $length;
-       }
-
        /**
         * Adds a value to given stack
         *
@@ -440,6 +407,19 @@ class BaseFileStack extends BaseStacker {
                // Now, simply return the found count value, this must be up-to-date then!
                return $this->getCounter();
        }
+
+       /**
+        * Calculates minimum length for one entry/block
+        *
+        * @return      $length         Minimum length for one entry/block
+        */
+       public function caluclateMinimumBlockLength () {
+               // Calulcate it
+               $length = self::getHashLength() + strlen(chr(self::SEPARATOR_HASH_NAME)) + self::LENGTH_NAME + 1 + strlen(self::getBlockSeparator());
+
+               // Return it
+               return $length;
+       }
 }
 
 // [EOF]