*/
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
*
$current = $this->getIteratorInstance()->current();
// Simply output it
- self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current=%s', __METHOD__, __LINE__, print_r($current, TRUE)));
+ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] current(%s)=%s', __METHOD__, __LINE__, strlen($current), print_r($current, TRUE)));
} // END - while
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(sprintf('[%s:%d:] EXIT!', __METHOD__, __LINE__));
$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
*
// 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]