//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
// Check length of count
- assert(strlen($header[1]) == BaseFile::LENGTH_COUNT);
+ assert(strlen($header[1]) == BaseBinaryFile::LENGTH_COUNT);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
// Decode count
chr(BaseBinaryFile::SEPARATOR_HEADER_DATA),
// Total entries
- str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
+ str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseBinaryFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
// Separator header<->entries
chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES)
$this->getIteratorInstance()->setHeaderSize(
strlen(self::INDEX_MAGIC) +
strlen(chr(BaseBinaryFile::SEPARATOR_HEADER_DATA)) +
- BaseFile::LENGTH_COUNT +
+ BaseBinaryFile::LENGTH_COUNT +
strlen(chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES))
);
*/
public function calculateMinimumBlockLength () {
// Calulcate it
- $length = BaseFile::LENGTH_TYPE + strlen(chr(BaseBinaryFile::SEPARATOR_TYPE_POSITION)) + BaseFile::LENGTH_POSITION + strlen(chr(BaseBinaryFile::SEPARATOR_ENTRIES));
+ $length = BaseBinaryFile::LENGTH_TYPE + strlen(chr(BaseBinaryFile::SEPARATOR_TYPE_POSITION)) + BaseBinaryFile::LENGTH_POSITION + strlen(chr(BaseBinaryFile::SEPARATOR_ENTRIES));
// Return it
return $length;
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
// Check length of count and seek position
- assert(strlen($header[1]) == BaseFile::LENGTH_COUNT);
+ assert(strlen($header[1]) == BaseBinaryFile::LENGTH_COUNT);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
- assert(strlen($header[2]) == BaseFile::LENGTH_POSITION);
+ assert(strlen($header[2]) == BaseBinaryFile::LENGTH_POSITION);
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] Passed assert().', __METHOD__, __LINE__));
// Decode count and seek position
chr(BaseBinaryFile::SEPARATOR_HEADER_DATA),
// Total entries (will be zero) and pad it to 20 chars
- str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
+ str_pad($this->dec2hex($this->getIteratorInstance()->getCounter()), BaseBinaryFile::LENGTH_COUNT, '0', STR_PAD_LEFT),
// Separator count<->seek position
chr(BaseBinaryFile::SEPARATOR_HEADER_DATA),
// Position (will be zero)
- str_pad($this->dec2hex($this->getSeekPosition(), 2), BaseFile::LENGTH_POSITION, '0', STR_PAD_LEFT),
+ str_pad($this->dec2hex($this->getSeekPosition(), 2), BaseBinaryFile::LENGTH_POSITION, '0', STR_PAD_LEFT),
// Separator position<->entries
chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES)
$this->getIteratorInstance()->setHeaderSize(
strlen(self::STACK_MAGIC) +
strlen(chr(BaseBinaryFile::SEPARATOR_HEADER_DATA)) +
- BaseFile::LENGTH_COUNT +
+ BaseBinaryFile::LENGTH_COUNT +
strlen(chr(BaseBinaryFile::SEPARATOR_HEADER_DATA)) +
- BaseFile::LENGTH_POSITION +
+ BaseBinaryFile::LENGTH_POSITION +
strlen(chr(BaseBinaryFile::SEPARATOR_HEADER_ENTRIES))
);
*/
public function calculateMinimumBlockLength () {
// Calulcate it
- $length = self::getHashLength() + strlen(chr(BaseBinaryFile::SEPARATOR_HASH_NAME)) + BaseFile::LENGTH_NAME + 1 + strlen(chr(BaseBinaryFile::SEPARATOR_ENTRIES));
+ $length = self::getHashLength() + strlen(chr(BaseBinaryFile::SEPARATOR_HASH_NAME)) + BaseBinaryFile::LENGTH_NAME + 1 + strlen(chr(BaseBinaryFile::SEPARATOR_ENTRIES));
// Return it
return $length;