/* Only for debugging
if (isset($this->gaps[0])) {
// Output first and last gap
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] this->gaps[0]=%s,this->gaps[%s]=%s', __METHOD__, __LINE__, print_r($this->gaps[0], TRUE), (count($this->gaps) - 1), print_r($this->gaps[count($this->gaps) - 1], TRUE)));
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] this->gaps[0]=%s,this->gaps[%s]=%s', __METHOD__, __LINE__, print_r($this->gaps[0], true), (count($this->gaps) - 1), print_r($this->gaps[count($this->gaps) - 1], true)));
} // END - if
*/
*/
public static function isBlockSeparatorFound ($str) {
// Determine it
- $isFound = (strpos($str, chr(self::SEPARATOR_ENTRIES)) !== FALSE);
+ $isFound = (strpos($str, chr(self::SEPARATOR_ENTRIES)) !== false);
// Return result
return $isFound;
* @param $flushHeader Whether to flush the header (default: flush)
* @return void
*/
- public function writeData ($seekPosition, $data, $flushHeader = TRUE) {
+ public function writeData ($seekPosition, $data, $flushHeader = true) {
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] seekPosition=%s,data()=%d - CALLED!', __METHOD__, __LINE__, $seekPosition, strlen($data)));
// Write data at given position
$this->updateSeekPosition();
// Flush the header?
- if ($flushHeader === TRUE) {
+ if ($flushHeader === true) {
// Flush header
$this->flushFileHeader();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
// Default is not initialized
- $isInitialized = FALSE;
+ $isInitialized = false;
// Is the file initialized?
if ($this->isFileInitialized()) {
$this->readFileHeader();
// The above method does already check the header
- $isInitialized = TRUE;
+ $isInitialized = true;
} // END - if
// Return result
public function isFileInitialized () {
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] CALLED!', __METHOD__, __LINE__));
- // Get it from iterator which holds the pointer instance. If FALSE is returned
+ // Get it from iterator which holds the pointer instance. If false is returned
$fileSize = $this->size();
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] fileSize=%s', __METHOD__, __LINE__, $fileSize));
/*
- * The returned file size should not be FALSE or NULL as this means
+ * The returned file size should not be false or NULL as this means
* that the pointer class does not work correctly.
*/
assert(is_int($fileSize));
$dataArray = explode(chr(self::SEPARATOR_ENTRIES), $data);
// This array must contain two elements
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('dataArray=' . print_r($dataArray, TRUE));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('dataArray=' . print_r($dataArray, true));
assert(count($dataArray) == 2);
// Left part is the actual block, right one the back-buffer data
/**
* Checks wether the current entry is valid (not at the end of the file).
- * This method will return TRUE if an emptied (nulled) entry has been found.
+ * This method will return true if an emptied (nulled) entry has been found.
*
* @return $isValid Whether the next entry is valid
*/