]> git.mxchange.org Git - core.git/commitdiff
Also them has been moved.
authorRoland Haeder <roland@mxchange.org>
Sat, 31 May 2014 11:24:48 +0000 (13:24 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 31 May 2014 11:24:48 +0000 (13:24 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/classes/main/index/class_BaseIndex.php
inc/classes/main/stacker/file/class_BaseFileStack.php

index 6dac01246e59109249b568bc239a83604f1cc1a9..1b0b153317321254242616e9bd4a8c1120525d6f 100644 (file)
@@ -41,7 +41,7 @@ class BaseIndex extends BaseFrameworkSystem {
                $this->setHeaderSize(
                        strlen(self::INDEX_MAGIC) +
                        strlen(chr(BaseFile::SEPARATOR_HEADER_DATA)) +
-                       self::LENGTH_COUNT +
+                       BaseFile::LENGTH_COUNT +
                        strlen(chr(BaseFile::SEPARATOR_HEADER_ENTRIES))
                );
 
@@ -100,7 +100,7 @@ class BaseIndex extends BaseFrameworkSystem {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Check length of count
-               assert(strlen($header[1]) == self::LENGTH_COUNT);
+               assert(strlen($header[1]) == BaseFile::LENGTH_COUNT);
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Decode count
@@ -126,7 +126,7 @@ class BaseIndex extends BaseFrameworkSystem {
                        chr(BaseFile::SEPARATOR_HEADER_DATA),
 
                        // Total entries
-                       str_pad($this->dec2hex($this->getCounter()), self::LENGTH_COUNT, '0', STR_PAD_LEFT),
+                       str_pad($this->dec2hex($this->getCounter()), BaseFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
 
                        // Separator header<->entries
                        chr(BaseFile::SEPARATOR_HEADER_ENTRIES)
@@ -184,7 +184,7 @@ class BaseIndex extends BaseFrameworkSystem {
         */
        public function calculateMinimumBlockLength () {
                // Calulcate it
-               $length = self::LENGTH_TYPE + strlen(chr(BaseFile::SEPARATOR_TYPE_POSITION)) + self::LENGTH_POSITION + strlen(chr(BaseFile::SEPARATOR_ENTRIES));
+               $length = BaseFile::LENGTH_TYPE + strlen(chr(BaseFile::SEPARATOR_TYPE_POSITION)) + BaseFile::LENGTH_POSITION + strlen(chr(BaseFile::SEPARATOR_ENTRIES));
 
                // Return it
                return $length;
index b70d1ded3206135379420145f74067098a769f9e..8a9abe0bb15d934cd299a6e60b19781f419be06b 100644 (file)
@@ -41,9 +41,9 @@ class BaseFileStack extends BaseStacker {
                $this->setHeaderSize(
                        strlen(self::STACK_MAGIC) +
                        strlen(chr(BaseFile::SEPARATOR_HEADER_DATA)) +
-                       self::LENGTH_COUNT +
+                       BaseFile::LENGTH_COUNT +
                        strlen(chr(BaseFile::SEPARATOR_HEADER_DATA)) +
-                       self::LENGTH_POSITION +
+                       BaseFile::LENGTH_POSITION +
                        strlen(chr(BaseFile::SEPARATOR_HEADER_ENTRIES))
                );
 
@@ -104,9 +104,9 @@ class BaseFileStack extends BaseStacker {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Check length of count and seek position
-               assert(strlen($header[1]) == self::LENGTH_COUNT);
+               assert(strlen($header[1]) == BaseFile::LENGTH_COUNT);
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
-               assert(strlen($header[2]) == self::LENGTH_POSITION);
+               assert(strlen($header[2]) == BaseFile::LENGTH_POSITION);
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
 
                // Decode count and seek position
@@ -133,13 +133,13 @@ class BaseFileStack extends BaseStacker {
                        chr(BaseFile::SEPARATOR_HEADER_DATA),
 
                        // Total entries (will be zero) and pad it to 20 chars
-                       str_pad($this->dec2hex($this->getCounter()), self::LENGTH_COUNT, '0', STR_PAD_LEFT),
+                       str_pad($this->dec2hex($this->getCounter()), BaseFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
 
                        // Separator count<->seek position
                        chr(BaseFile::SEPARATOR_HEADER_DATA),
 
                        // Position (will be zero)
-                       str_pad($this->dec2hex($this->getSeekPosition(), 2), self::LENGTH_POSITION, '0', STR_PAD_LEFT),
+                       str_pad($this->dec2hex($this->getSeekPosition(), 2), BaseFile::LENGTH_POSITION, '0', STR_PAD_LEFT),
 
                        // Separator position<->entries
                        chr(BaseFile::SEPARATOR_HEADER_ENTRIES)
@@ -410,7 +410,7 @@ class BaseFileStack extends BaseStacker {
         */
        public function calculateMinimumBlockLength () {
                // Calulcate it
-               $length = self::getHashLength() + strlen(chr(BaseFile::SEPARATOR_HASH_NAME)) + self::LENGTH_NAME + 1 + strlen(chr(BaseFile::SEPARATOR_ENTRIES));
+               $length = self::getHashLength() + strlen(chr(BaseFile::SEPARATOR_HASH_NAME)) + BaseFile::LENGTH_NAME + 1 + strlen(chr(BaseFile::SEPARATOR_ENTRIES));
 
                // Return it
                return $length;