- removed superflous __METHOD__/__LINE__ inclusion when it is already given
- added some informative text back
Signed-off-by: Roland Häder <roland@mxchange.org>
15 files changed:
// Add last new-line
$rawRequest .= self::HTTP_EOL;
// Add last new-line
$rawRequest .= self::HTTP_EOL;
- //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('HTTP-CLIENT[' . __METHOD__ . ':' . __LINE__ . ']: rawRequest=' . $rawRequest);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('HTTP-CLIENT: rawRequest=' . $rawRequest);
// Write request
fwrite($this->getSocketResource(), $rawRequest);
// Write request
fwrite($this->getSocketResource(), $rawRequest);
*/
public final function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
// Debug message
*/
public final function addCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
$criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
// Debug message
$criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA: criteriaKey=' . $criteriaKey);
// Append it
$this->appendStringToGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
// Append it
$this->appendStringToGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
*/
public final function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
// Debug message
*/
public final function setCriteria ($criteriaKey, $criteriaValue, $criteriaType = 'default') {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue . ',criteriaType=' . $criteriaType . ' - CALLED!');
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
$criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
// Debug message
$criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA: criteriaKey=' . $criteriaKey);
// Set it
$this->setStringGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
// Set it
$this->setStringGenericArrayElement('criteria', $criteriaType, 'entries', $criteriaKey, $criteriaValue);
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
// Debug message
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false) && (!is_bool($criteriaValue)));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '(' . $this->__toString() . ')-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaValue=' . $criteriaValue);
// Add it
$this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', StringUtils::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
// Add it
$this->pushValueToGenericArrayElement('criteria', 'choice', 'entries', StringUtils::convertDashesToUnderscores($criteriaKey), (string) $criteriaValue);
*/
public function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default') {
// Debug message
*/
public function getCriteriaElemnent ($criteriaKey, $criteriaType = 'default') {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteriaType=' . $criteriaType . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteriaType=' . $criteriaType . ' - CALLED!');
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false));
// Make sure no 'my-' or 'my_' passes this point
assert((strpos($criteriaKey, 'my-') === false) && (strpos($criteriaKey, 'my_') === false));
$criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
// Debug message
$criteriaKey = StringUtils::convertDashesToUnderscores($criteriaKey);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: criteriaKey=' . $criteriaKey . ',criteria()=' . $this->countGenericArrayGroup('criteria', $criteriaType));
// Default is not found
$value = false;
// Default is not found
$value = false;
} // END - if
// Debug message
} // END - if
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: value=' . $value . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($criteriaType) . '-CRITERIA: value=' . $value . ' - EXIT!');
// Return the value
return $value;
// Return the value
return $value;
$primaryKeys = $this->getPrimaryKeys();
// Debug message
$primaryKeys = $this->getPrimaryKeys();
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',primaryKey=' . $primaryKey . ',primaryKeys()=' . count($primaryKeys));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATA-SET-CRITERIA: tableName=' . $this->getTableName() . ',primaryKey=' . $primaryKey . ',primaryKeys()=' . count($primaryKeys));
/*
* If this is not set, this could mean a badly written frontend as
/*
* If this is not set, this could mean a badly written frontend as
} // END - foreach
// Debug message
} // END - foreach
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',return=' . $return . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATA-SET-CRITERIA: tableName=' . $this->getTableName() . ',return=' . $return . ' - EXIT!');
// Return it
return $return;
// Return it
return $return;
return $primaryKey;
} else {
// @TODO Issue a warning
return $primaryKey;
} else {
// @TODO Issue a warning
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Primary key not set for table ' . $this->getTableName() . ', please fix your table. Falling back to unique key ...');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATA-SET-CRITERIA: Primary key not set for table ' . $this->getTableName() . ', please fix your table. Falling back to unique key ...');
// Get unique key
$uniqueKey = trim($this->getCriteriaElemnent($this->getUniqueKey()));
// Debug message
// Get unique key
$uniqueKey = trim($this->getCriteriaElemnent($this->getUniqueKey()));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: tableName=' . $this->getTableName() . ',uniqueKey=' . $uniqueKey);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATA-SET-CRITERIA: tableName=' . $this->getTableName() . ',uniqueKey=' . $uniqueKey);
// Is it empty, too?
if (empty($uniqueKey)) {
// Is it empty, too?
if (empty($uniqueKey)) {
$valueArray = explode($separator, $value);
// Debug message
$valueArray = explode($separator, $value);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ' - CALLED!');
// Get 'default' search value
$searchDefault = $this->getCriteriaElemnent($key);
// Debug message
// Get 'default' search value
$searchDefault = $this->getCriteriaElemnent($key);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault);
// 'default' check
$isMatching = (((($searchDefault !== false) && ($searchDefault == $value)) || ((is_null($searchDefault)) && (is_null($value)))) || ($searchDefault === false));
// Debug message
// 'default' check
$isMatching = (((($searchDefault !== false) && ($searchDefault == $value)) || ((is_null($searchDefault)) && (is_null($value)))) || ($searchDefault === false));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault . ',isMatching=' . intval($isMatching));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaElement(' . $key . ')[' . gettype($searchDefault) . ']=' . $searchDefault . ',isMatching=' . intval($isMatching));
// Get 'choice' search value (can be NULL or $separator-separated string)
$searchChoice = $this->getCriteriaChoiceElemnent($key);
// Get 'choice' search value (can be NULL or $separator-separated string)
$searchChoice = $this->getCriteriaChoiceElemnent($key);
assert(($searchChoice === false) || (is_array($searchChoice)));
// Debug message
assert(($searchChoice === false) || (is_array($searchChoice)));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[' . gettype($searchChoice) . ']=' . print_r($searchChoice, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[' . gettype($searchChoice) . ']=' . print_r($searchChoice, true));
// 'choice' check
if ((is_array($searchChoice)) && (count($valueArray) == 1)) {
// 'choice' check
if ((is_array($searchChoice)) && (count($valueArray) == 1)) {
$isMatching = ((($isMatching === true) || (($searchDefault === false) && (!is_null($value)))) && (in_array($value, $searchChoice)));
// Debug message
$isMatching = ((($isMatching === true) || (($searchDefault === false) && (!is_null($value)))) && (in_array($value, $searchChoice)));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - SINGLE-MATCH');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - SINGLE-MATCH');
} elseif ((is_array($searchChoice)) && (count($valueArray) > 1)) {
// Debug message
} elseif ((is_array($searchChoice)) && (count($valueArray) > 1)) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',isMatching=' . intval($isMatching));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',isMatching=' . intval($isMatching));
// $value is choice-search value, so check all entries
$isMatching = (($isMatching === true) || (($searchDefault === false) && (!is_null($value))));
$idx = 0;
foreach ($valueArray as $idx => $match) {
// Debug message
// $value is choice-search value, so check all entries
$isMatching = (($isMatching === true) || (($searchDefault === false) && (!is_null($value))));
$idx = 0;
foreach ($valueArray as $idx => $match) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',count(searchChoice)=' . count($searchChoice));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: match=' . $match . ',count(searchChoice)=' . count($searchChoice));
// Is it found? (one is okay)
$isMatching = (($isMatching === true) && (in_array($match, $searchChoice)));
// Debug message
// Is it found? (one is okay)
$isMatching = (($isMatching === true) && (in_array($match, $searchChoice)));
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',isMatching=' . intval($isMatching));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: match=' . $match . ',isMatching=' . intval($isMatching));
} // END - foreach
// Debug message
} // END - foreach
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',valueArray()=' . count($valueArray) . ',idx=' . $idx . ',isMatching=' . intval($isMatching) . ' - CHOICE-MATCH');
} else {
// Choice-match is false
// Debug message
} else {
// Choice-match is false
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - false-MATCH');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - false-MATCH');
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',isMatching=' . intval($isMatching));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaChoiceElement(' . $key . ')[]=' . gettype($searchChoice) . ',isMatching=' . intval($isMatching));
// Get 'exclude' search value
$searchExclude = $this->getCriteriaExcludeElemnent($key);
// Debug message
// Get 'exclude' search value
$searchExclude = $this->getCriteriaExcludeElemnent($key);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: getCriteriaExcludeElement(' . $key . ')[' . gettype($searchExclude) . ']=' . $searchExclude);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: getCriteriaExcludeElement(' . $key . ')[' . gettype($searchExclude) . ']=' . $searchExclude);
// 'exclude' check
$isMatching = (
// 'exclude' check
$isMatching = (
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA[' . __METHOD__ . ':' . __LINE__ . ']: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SEARCH-CRITERIA: key=' . $key . ',value[' . gettype($value) . ']=' . $value . ',isMatching=' . intval($isMatching) . ' - EXIT!');
$pointerInstance->setPathName($pathName);
// Return the instance
$pointerInstance->setPathName($pathName);
// Return the instance
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: Opened pathName=' . $pathName . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: Opened pathName=' . $pathName . ' - EXIT!');
return $pointerInstance;
}
return $pointerInstance;
}
$currentEntry = $this->getDirectoryIteratorInstance()->current();
// Return found entry
$currentEntry = $this->getDirectoryIteratorInstance()->current();
// Return found entry
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: currentEntry[]=' . gettype($currentEntry) . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: currentEntry[]=' . gettype($currentEntry) . ' - EXIT!');
// No exceptions given?
if (count($except) == 0) {
// No exception given, so read all files and directories, but not recursive
// No exceptions given?
if (count($except) == 0) {
// No exception given, so read all files and directories, but not recursive
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: No exceptions given, please use readRawDirectory() instead!');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: No exceptions given, please use readRawDirectory() instead!');
return $this->readRawDirectory();
} elseif (!$this->getDirectoryIteratorInstance()->valid()) {
// No more left to read
return $this->readRawDirectory();
} elseif (!$this->getDirectoryIteratorInstance()->valid()) {
// No more left to read
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: EOD reached.');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: EOD reached.');
// Read a raw line...
$currentEntry = $this->readRawDirectory();
// Read a raw line...
$currentEntry = $this->readRawDirectory();
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: currentEntry[]=' . gettype($currentEntry));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: currentEntry[]=' . gettype($currentEntry));
// Shall we exclude directories?
if (is_object($currentEntry)) {
// Get file name
$fileInfoInstance = $currentEntry;
// Shall we exclude directories?
if (is_object($currentEntry)) {
// Get file name
$fileInfoInstance = $currentEntry;
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot()));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance . ',isDot=' . intval($this->getDirectoryIteratorInstance()->isDot()));
// Is it a dot-directory or excluded?
if (($this->getDirectoryIteratorInstance()->isDot()) && (!in_array($fileInfoInstance, $except))) {
// Is it a dot-directory or excluded?
if (($this->getDirectoryIteratorInstance()->isDot()) && (!in_array($fileInfoInstance, $except))) {
// Exclude this part
$fileInfoInstance = $this->readDirectoryExcept($except);
// Exclude this part
$fileInfoInstance = $this->readDirectoryExcept($except);
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance . ' - Recursive call!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance . ' - Recursive call!');
} // END - if
} // END - if
} // END - if
} // END - if
$this->getDirectoryIteratorInstance()->next();
// Return read line
$this->getDirectoryIteratorInstance()->next();
// Return read line
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY[' . __METHOD__ . ':' . __LINE__ . ']: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DIRECTORY: fileInfoInstance[' . gettype($fileInfoInstance) . ']=' . $fileInfoInstance);
return $fileInfoInstance;
}
return $fileInfoInstance;
}
$handlerInstance = new TaskHandler();
// Output debug message
$handlerInstance = new TaskHandler();
// Output debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Initializing task handler.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Initializing task handler.');
// Init the task list
$handlerInstance->setListInstance(ObjectFactory::createObjectByConfiguredName('task_list_class'));
// Init the task list
$handlerInstance->setListInstance(ObjectFactory::createObjectByConfiguredName('task_list_class'));
$handlerInstance->registerTask('idle_loop', $taskInstance);
// Output debug message
$handlerInstance->registerTask('idle_loop', $taskInstance);
// Output debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task handler initialized.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Task handler initialized.');
// Return the prepared instance
return $handlerInstance;
// Return the prepared instance
return $handlerInstance;
// Should we start now?
if ($diff < $currentTask['task_startup_delay']) {
// Skip this silently
// Should we start now?
if ($diff < $currentTask['task_startup_delay']) {
// Skip this silently
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' not started: diff=' . $diff . ',task_startup_delay=' . $currentTask['task_startup_delay']);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Task ' . $currentTask['id'] . ' not started: diff=' . $diff . ',task_startup_delay=' . $currentTask['task_startup_delay']);
$updateTask = true;
// Debug message
$updateTask = true;
// Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Task ' . $currentTask['id'] . ' started with startup_delay=' . $currentTask['task_startup_delay'] . 'ms');
} // END - if
// Get time difference from interval delay
$diff = ($this->getMilliTime() - $currentTask['task_last_activity']) * 1000;
// Debug message
} // END - if
// Get time difference from interval delay
$diff = ($this->getMilliTime() - $currentTask['task_last_activity']) * 1000;
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task ' . $currentTask['id'] . ' diff=' . $diff . ',task_interval_delay=' . $currentTask['task_interval_delay'] . ',task_max_runs=' . $currentTask['task_max_runs'] . ',task_total_runs=' . $currentTask['task_total_runs']);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Task ' . $currentTask['id'] . ' diff=' . $diff . ',task_interval_delay=' . $currentTask['task_interval_delay'] . ',task_max_runs=' . $currentTask['task_max_runs'] . ',task_total_runs=' . $currentTask['task_total_runs']);
// Is the interval delay reached?
if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_max_runs'] > 0) && ($currentTask['task_total_runs'] == $currentTask['task_max_runs']))) {
// Is the interval delay reached?
if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_max_runs'] > 0) && ($currentTask['task_total_runs'] == $currentTask['task_max_runs']))) {
*/
private function unregisterTask (array $taskData) {
// Debug output
*/
private function unregisterTask (array $taskData) {
// Debug output
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Removing task ' . $taskData['id'] . ' from queue - CALLED!');
// Remove the entry
$this->getListInstance()->removeEntry('tasks', $taskData);
// Debug output
// Remove the entry
$this->getListInstance()->removeEntry('tasks', $taskData);
// Debug output
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Removing task ' . $taskData['id'] . ' from queue - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Removing task ' . $taskData['id'] . ' from queue - EXIT!');
$this->getListInstance()->addEntry('tasks', $taskEntry);
// Debug message
$this->getListInstance()->addEntry('tasks', $taskEntry);
// Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Task registered: taskName=' . $taskName .
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Task registered: taskName=' . $taskName .
' (taskInstance=' . $taskInstance->__toString() . ')' .
', startupDelay=' . $taskEntry['task_startup_delay'] . 'ms' .
', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms' .
' (taskInstance=' . $taskInstance->__toString() . ')' .
', startupDelay=' . $taskEntry['task_startup_delay'] . 'ms' .
', intervalDelay=' . $taskEntry['task_interval_delay'] . 'ms' .
$this->getListInstance()->getIterator()->rewind();
// Debug message
$this->getListInstance()->getIterator()->rewind();
// Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Shutting down all ' . $this->getListInstance()->count() . ' tasks...');
// Remember all tasks that has been shutdown for removal
$tasks = array();
// Remember all tasks that has been shutdown for removal
$tasks = array();
$currentTask = $this->getListInstance()->getIterator()->current();
// Output debug message
$currentTask = $this->getListInstance()->getIterator()->current();
// Output debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down task ' . $currentTask['id'] . ' (taskInstance=' . $currentTask['task_instance']->__toString() . ') ...');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Shutting down task ' . $currentTask['id'] . ' (taskInstance=' . $currentTask['task_instance']->__toString() . ') ...');
// Shutdown the task
$currentTask['task_instance']->accept($this->getVisitorInstance());
// Shutdown the task
$currentTask['task_instance']->accept($this->getVisitorInstance());
} // END - while
// Debug message
} // END - while
// Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Shutdown of all tasks completed.');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK-HANDLER: Shutdown of all tasks completed.');
// Remove all tasks
foreach ($tasks as $entry) {
// Remove all tasks
foreach ($tasks as $entry) {
* @return $isset Whether the group is valid
*/
public function isGroupSet ($groupName) {
* @return $isset Whether the group is valid
*/
public function isGroupSet ($groupName) {
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName);
return isset($this->listGroups[$groupName]);
}
return isset($this->listGroups[$groupName]);
}
* @throws ListGroupAlreadyAddedException If the given group is already added
*/
public function addGroup ($groupName) {
* @throws ListGroupAlreadyAddedException If the given group is already added
*/
public function addGroup ($groupName) {
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
// Is the group already added?
if ($this->isGroupSet($groupName)) {
// Throw the exception here
// Is the group already added?
if ($this->isGroupSet($groupName)) {
// Throw the exception here
// Add the group which is a simple array
$this->listGroups[$groupName] = ObjectFactory::createObjectByConfiguredName('list_group_class');
// Add the group which is a simple array
$this->listGroups[$groupName] = ObjectFactory::createObjectByConfiguredName('list_group_class');
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
*/
public function addInstance ($groupName, $subGroup, Visitable $visitableInstance) {
// Debug message
*/
public function addInstance ($groupName, $subGroup, Visitable $visitableInstance) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',subGroup=' . $subGroup . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ',subGroup=' . $subGroup . ',visitableInstance=' . $visitableInstance->__toString() . ' - CALLED!');
// Is the group there?
if (!$this->isGroupSet($groupName)) {
// Is the group there?
if (!$this->isGroupSet($groupName)) {
$hash = $this->generateHash($groupName, $subGroup, $visitableInstance);
// Debug message
$hash = $this->generateHash($groupName, $subGroup, $visitableInstance);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',this->listGroups[' . $groupName . ']=' . $this->listGroups[$groupName]->__toString());
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',this->listGroups[' . $groupName . ']=' . $this->listGroups[$groupName]->__toString());
// Add the hash to the index
array_push($this->listIndex, $hash);
// Add the hash to the index
array_push($this->listIndex, $hash);
$this->listEntries[$hash] = $visitableInstance;
// Debug message
$this->listEntries[$hash] = $visitableInstance;
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',subGroup=' . $subGroup . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ',subGroup=' . $subGroup . ' - EXIT!');
*/
public final function getArrayFromList ($list) {
// Debug message
*/
public final function getArrayFromList ($list) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ' - CALLED!');
// Is the group there?
if ((!is_null($list)) && (!$this->isGroupSet($list))) {
// Is the group there?
if ((!is_null($list)) && (!$this->isGroupSet($list))) {
// Walk through all entries
foreach ($this->listIndex as $hash) {
// Debug message
// Walk through all entries
foreach ($this->listIndex as $hash) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: hash=' . $hash);
// Is the list entry set?
if ($this->isHashValid($hash)) {
// Add it
array_push($array, $this->listEntries[$hash]);
// Is the list entry set?
if ($this->isHashValid($hash)) {
// Add it
array_push($array, $this->listEntries[$hash]);
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: hash=' . $hash . ',array(' . count($array) . ')=' . print_r($array, true) . ' - ADDED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: hash=' . $hash . ',array(' . count($array) . ')=' . print_r($array, true) . ' - ADDED!');
} // END - if
} // END - foreach
// Debug message
} // END - if
} // END - foreach
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ',array()=' . count($array) . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',list[' . gettype($list) . ']=' . $list . ',array()=' . count($array) . ' - EXIT!');
// Return it
return $array;
// Return it
return $array;
*/
public function addEntry ($groupName, $entry) {
// Debug message
*/
public function addEntry ($groupName, $entry) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
// Is the group already added?
if (!$this->isGroupSet($groupName)) {
// Is the group already added?
if (!$this->isGroupSet($groupName)) {
$hash = $this->generateHash($groupName, $groupName, $entry);
// Debug message
$hash = $this->generateHash($groupName, $groupName, $entry);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . print_r($entry, true) . ', hash=' . $hash);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . print_r($entry, true) . ', hash=' . $hash);
// Add the hash to the index
array_push($this->listIndex, $hash);
// Debug message
// Add the hash to the index
array_push($this->listIndex, $hash);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries));
// Now add the entry to the list
$this->listEntries[$hash] = $entry;
// Debug message
// Now add the entry to the list
$this->listEntries[$hash] = $entry;
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries) . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ',listEntries()=' . count($this->listEntries) . ' - EXIT!');
*/
public function removeEntry ($groupName, $entry) {
// Debug message
*/
public function removeEntry ($groupName, $entry) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ' - CALLED!');
// Is the group already added?
if (!$this->isGroupSet($groupName)) {
// Is the group already added?
if (!$this->isGroupSet($groupName)) {
$hash = $this->generateHash($groupName, $groupName, $entry);
// Debug message
$hash = $this->generateHash($groupName, $groupName, $entry);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . $entry . ', hash=' . $hash);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ',entry=' . $entry . ', hash=' . $hash);
// Remove it from the list ...
unset($this->listEntries[$hash]);
// Remove it from the list ...
unset($this->listEntries[$hash]);
unset($this->listIndex[array_search($hash, $this->listIndex)]);
// Debug message
unset($this->listIndex[array_search($hash, $this->listIndex)]);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: this=' . $this->__toString() . ',groupName=' . $groupName . ' - EXIT!');
$entry2 = $this->getCallbackInstance()->generateListHashFromEntry($entry);
} else {
// Unsupported type detected
$entry2 = $this->getCallbackInstance()->generateListHashFromEntry($entry);
} else {
// Unsupported type detected
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST[' . __METHOD__ . ':' . __LINE__ . ']: Entry type ' . gettype($entry) . ' is unsupported (this->callbackInstance=' . $this->getCallbackInstance() . ').');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-LIST: Entry type ' . gettype($entry) . ' is unsupported (this->callbackInstance=' . $this->getCallbackInstance() . ').');
// At least take all keys from array
$entry2 = gettype($entry) . ':' . implode(':', array_keys($entry));
// At least take all keys from array
$entry2 = gettype($entry) . ':' . implode(':', array_keys($entry));
$templateInstance->loadMenuTemplate($command . '_menu_entries');
} catch (FileNotFoundException $e) {
// Log exception @TODO Maybe to intrusive?
$templateInstance->loadMenuTemplate($command . '_menu_entries');
} catch (FileNotFoundException $e) {
// Log exception @TODO Maybe to intrusive?
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: Exception caught: ' . $e->__toString() . ', with message: ' . $e->getMessage());
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-MENU: Exception caught: ' . $e->__toString() . ', with message: ' . $e->getMessage());
}
// Render template data here
}
// Render template data here
$entry = array();
// Debug message
$entry = array();
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking arrayKey=' . $arrayKey . ',lookFor=' . $lookFor);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Checking arrayKey=' . $arrayKey . ',lookFor=' . $lookFor);
// "Walk" over all entries
foreach ($this->getEntries($arrayKey) as $key => $value) {
// Debug message
// "Walk" over all entries
foreach ($this->getEntries($arrayKey) as $key => $value) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key=' . $key . ',value=' . $value . ',lookFor=' . $lookFor);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Checking key=' . $key . ',value=' . $value . ',lookFor=' . $lookFor);
// If $value matches the $lookFor, we need to look for more entries for this!
if ($lookFor == $value) {
// If $value matches the $lookFor, we need to look for more entries for this!
if ($lookFor == $value) {
// Now "walk" through all entries, if an array is returned
if (is_array($value2)) {
// Debug message
// Now "walk" through all entries, if an array is returned
if (is_array($value2)) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key2=' . $key2 . ',value2()=' . count($value2) . ',lookFor=' . $lookFor);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Checking key2=' . $key2 . ',value2()=' . count($value2) . ',lookFor=' . $lookFor);
// "Walk" through all of them
foreach ($value2 as $key3 => $value3) {
// "Walk" through all of them
foreach ($value2 as $key3 => $value3) {
assert(is_array($value3));
// Debug message
assert(is_array($value3));
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Checking key=' . $key . ',key3=' . $key3 . ',isset()=' . isset($value3[$key]) . ' ...');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Checking key=' . $key . ',key3=' . $key3 . ',isset()=' . isset($value3[$key]) . ' ...');
// Both keys must match!
if (($key == $key3) || (isset($value3[$key]))) {
// Debug message
// Both keys must match!
if (($key == $key3) || (isset($value3[$key]))) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Adding ' . $value3[$key] . ' ...');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Adding ' . $value3[$key] . ' ...');
// Then add it
$entry[$key3] = $value3[$key];
// Then add it
$entry[$key3] = $value3[$key];
} // END - foreach
// Debug message
} // END - foreach
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Returning entry(' . count($entry) . ')=' . print_r($entry, true));
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('REGISTRY: Returning entry(' . count($entry) . ')=' . print_r($entry, true));
// Return it
return $entry;
// Return it
return $entry;
*/
public function encryptStream ($str, $key = NULL) {
// Debug message
*/
public function encryptStream ($str, $key = NULL) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: key[' . gettype($key) . ']=' . $key);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MCRYPT-STREAM: key[' . gettype($key) . ']=' . $key);
// Init crypto module
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
// Init crypto module
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
return $str;
// Debug message
return $str;
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: key[' . gettype($key) . ']=' . $key);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('OPENSSL-STREAM: key[' . gettype($key) . ']=' . $key);
// Init crypto module
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
// Init crypto module
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
*/
public function doShutdown () {
// Debug message
*/
public function doShutdown () {
// Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK[' . __METHOD__ . ':' . __LINE__ . ']: Shutting down...');
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TASK: Shutting down...');
* @return $rawTemplateData The raw data from the template
*/
public final function getRawTemplateData () {
* @return $rawTemplateData The raw data from the template
*/
public final function getRawTemplateData () {
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->rawTemplateData) . ' Bytes read.');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: ' . strlen($this->rawTemplateData) . ' Bytes read.');
return $this->rawTemplateData;
}
return $this->rawTemplateData;
}
*/
private final function setCompiledData ($compiledData) {
// And store it in this class
*/
private final function setCompiledData ($compiledData) {
// And store it in this class
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($compiledData) . ' Bytes set.');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: ' . strlen($compiledData) . ' Bytes set.');
$this->compiledData = (string) $compiledData;
}
$this->compiledData = (string) $compiledData;
}
* @return $compiledData Compiled template data
*/
public final function getCompiledData () {
* @return $compiledData Compiled template data
*/
public final function getCompiledData () {
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: ' . strlen($this->compiledData) . ' Bytes read.');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: ' . strlen($this->compiledData) . ' Bytes read.');
return $this->compiledData;
}
return $this->compiledData;
}
*/
private function loadRawTemplateData (SplFileInfo $fileInstance) {
// Some debug code to look on the file which is being loaded
*/
private function loadRawTemplateData (SplFileInfo $fileInstance) {
// Some debug code to look on the file which is being loaded
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: fileInstance=' . $fileInstance);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: fileInstance=' . $fileInstance);
// Load the raw template
$rawTemplateData = $this->getFileIoInstance()->loadFileContents($fileInstance);
// Load the raw template
$rawTemplateData = $this->getFileIoInstance()->loadFileContents($fileInstance);
$variableName = trim(StringUtils::convertDashesToUnderscores($variableName));
// Debug message
$variableName = trim(StringUtils::convertDashesToUnderscores($variableName));
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',variableName=' . $variableName);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: variableName=' . $variableName . ',variableName=' . $variableName);
// Is it not a config variable?
if ($variableName != 'config') {
// Is it not a config variable?
if ($variableName != 'config') {
preg_match_all('/\$(\w+)(\[(\w+)\])?/', $rawData, $variableMatches);
// Debug message
preg_match_all('/\$(\w+)(\[(\w+)\])?/', $rawData, $variableMatches);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawData(' . strlen($rawData) . ')=' . $rawData . ',variableMatches=' . print_r($variableMatches, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:rawData(' . strlen($rawData) . ')=' . $rawData . ',variableMatches=' . print_r($variableMatches, true));
// Did we find some variables?
if ((is_array($variableMatches)) && (count($variableMatches) == 4) && (count($variableMatches[0]) > 0)) {
// Did we find some variables?
if ((is_array($variableMatches)) && (count($variableMatches) == 4) && (count($variableMatches[0]) > 0)) {
// RECURSIVE PROTECTION! BE CAREFUL HERE!
if ((!isset($this->loadedRawData[$template])) && (!in_array($template, $this->loadedTemplates))) {
// Debug message
// RECURSIVE PROTECTION! BE CAREFUL HERE!
if ((!isset($this->loadedRawData[$template])) && (!in_array($template, $this->loadedTemplates))) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:template=' . $template);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:template=' . $template);
// Template not found, but maybe variable assigned?
if ($this->getVariableIndex($template) !== false) {
// Template not found, but maybe variable assigned?
if ($this->getVariableIndex($template) !== false) {
*/
private function assignAllVariables (array $varMatches) {
// Debug message
*/
private function assignAllVariables (array $varMatches) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varMatches()=' . count($varMatches));
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:varMatches()=' . count($varMatches));
// Search for all variables
foreach ($varMatches[1] as $key => $var) {
// Search for all variables
foreach ($varMatches[1] as $key => $var) {
$var = trim(StringUtils::convertDashesToUnderscores($var));
// Debug message
$var = trim(StringUtils::convertDashesToUnderscores($var));
// Debug message
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:key=' . $key . ',var=' . $var);
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:key=' . $key . ',var=' . $var);
// Detect leading equals
if (substr($varMatches[2][$key], 0, 1) == '=') {
// Detect leading equals
if (substr($varMatches[2][$key], 0, 1) == '=') {
*/
private function compileRawTemplateData (array $templateMatches) {
// Debug message
*/
private function compileRawTemplateData (array $templateMatches) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:loadedRawData()= ' .count($this->loadedRawData));
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:loadedRawData()= ' .count($this->loadedRawData));
// Are some code-templates found which we need to compile?
if (count($this->loadedRawData) > 0) {
// Then compile all!
foreach ($this->loadedRawData as $template => $code) {
// Debug message
// Are some code-templates found which we need to compile?
if (count($this->loadedRawData) > 0) {
// Then compile all!
foreach ($this->loadedRawData as $template => $code) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:template=' . $template . ',code(' . strlen($code) . ')=' . $code);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:template=' . $template . ',code(' . strlen($code) . ')=' . $code);
// Is this template already compiled?
if (in_array($template, $this->compiledTemplates)) {
// Then skip it
// Is this template already compiled?
if (in_array($template, $this->compiledTemplates)) {
// Then skip it
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: Template ' . $template . ' already compiled. SKIPPED!');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: Template ' . $template . ' already compiled. SKIPPED!');
if (($foundIndex !== false) && (isset($templateMatches[3][$foundIndex]))) {
// Split it up with another reg. exp. into variable=value pairs
preg_match_all($this->regExpVarValue, $templateMatches[3][$foundIndex], $varMatches);
if (($foundIndex !== false) && (isset($templateMatches[3][$foundIndex]))) {
// Split it up with another reg. exp. into variable=value pairs
preg_match_all($this->regExpVarValue, $templateMatches[3][$foundIndex], $varMatches);
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varMatches=' . print_r($varMatches, true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:varMatches=' . print_r($varMatches, true));
// Assign all variables
$this->assignAllVariables($varMatches);
// Assign all variables
$this->assignAllVariables($varMatches);
private function finalizeVariableCompilation () {
// Get the content
$content = $this->getRawTemplateData();
private function finalizeVariableCompilation () {
// Get the content
$content = $this->getRawTemplateData();
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: content before=' . strlen($content) . ' (' . md5($content) . ')');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: content before=' . strlen($content) . ' (' . md5($content) . ')');
// Do we have the stack?
if (!$this->isVarStackSet('general')) {
// Do we have the stack?
if (!$this->isVarStackSet('general')) {
// Walk through all variables
foreach ($this->getVarStack('general') as $currEntry) {
// Walk through all variables
foreach ($this->getVarStack('general') as $currEntry) {
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: name=' . $currEntry['name'] . ', value=<pre>' . htmlentities($currEntry['value']) . '</pre>');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: name=' . $currEntry['name'] . ', value=<pre>' . htmlentities($currEntry['value']) . '</pre>');
// Replace all [$var] or {?$var?} with the content
// @TODO Old behaviour, will become obsolete!
$content = str_replace('$content[' . $currEntry['name'] . ']', $currEntry['value'], $content);
// Replace all [$var] or {?$var?} with the content
// @TODO Old behaviour, will become obsolete!
$content = str_replace('$content[' . $currEntry['name'] . ']', $currEntry['value'], $content);
$content = str_replace('{?' . $currEntry['name'] . '?}', $currEntry['value'], $content);
} // END - for
$content = str_replace('{?' . $currEntry['name'] . '?}', $currEntry['value'], $content);
} // END - for
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: content after=' . strlen($content) . ' (' . md5($content) . ')');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: content after=' . strlen($content) . ' (' . md5($content) . ')');
// Set the content back
$this->setRawTemplateData($content);
// Set the content back
$this->setRawTemplateData($content);
// Was it found?
if ($index === false) {
// Add it to the stack
// Was it found?
if ($index === false) {
// Add it to the stack
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:ADD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:ADD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
$this->addVariable($variableName, $value);
} elseif (!empty($value)) {
// Modify the stack entry
$this->addVariable($variableName, $value);
} elseif (!empty($value)) {
// Modify the stack entry
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:MOD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:MOD: ' . $variableName . '[' . gettype($value) . ']=' . $value);
$this->modifyVariable($variableName, $value);
}
}
$this->modifyVariable($variableName, $value);
}
}
// Was it found?
if ($index !== false) {
// Remove this variable
// Was it found?
if ($index !== false) {
// Remove this variable
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:UNSET: variableGroup=' . $variableGroup . ',variableName=' . $variableName . ',index=' . $index);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:UNSET: variableGroup=' . $variableGroup . ',variableName=' . $variableName . ',index=' . $index);
$this->unsetVariableStackOffset($index, $variableGroup);
} // END - if
}
$this->unsetVariableStackOffset($index, $variableGroup);
} // END - if
}
$variableName = trim(StringUtils::convertDashesToUnderscores($variableName));
// Sweet and simple...
$variableName = trim(StringUtils::convertDashesToUnderscores($variableName));
// Sweet and simple...
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName));
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName));
$this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName));
}
$this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName));
}
// Do we have the stack?
if (!$this->isVarStackSet('general')) {
// Abort here silently
// Do we have the stack?
if (!$this->isVarStackSet('general')) {
// Abort here silently
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: Aborted, variable stack general not found!');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: Aborted, variable stack general not found!');
$value = $this->compileRawCode($this->readVariable($currVariable['name']), true);
// Debug message
$value = $this->compileRawCode($this->readVariable($currVariable['name']), true);
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: name=' . $currVariable['name'] . ',value=' . $value);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: name=' . $currVariable['name'] . ',value=' . $value);
// Remove it from stack
$this->removeVariable($currVariable['name'], 'general');
// Remove it from stack
$this->removeVariable($currVariable['name'], 'general');
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: value='. $value . ',name=' . $currVariable['name'] . ',index=' . $index);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: value='. $value . ',name=' . $currVariable['name'] . ',index=' . $index);
// Is it a configuration key?
if ($this->getConfigInstance()->isConfigurationEntrySet($value)) {
// Is it a configuration key?
if ($this->getConfigInstance()->isConfigurationEntrySet($value)) {
// Iterate through all general variables
foreach ($this->getVarStack('general') as $currVariable) {
// Transfer it's name/value combination to the $content array
// Iterate through all general variables
foreach ($this->getVarStack('general') as $currVariable) {
// Transfer it's name/value combination to the $content array
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:' . $currVariable['name'] . '=<pre>' . htmlentities($currVariable['value']).'</pre>');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:' . $currVariable['name'] . '=<pre>' . htmlentities($currVariable['value']).'</pre>');
$dummy[$currVariable['name']] = $currVariable['value'];
}// END - if
$dummy[$currVariable['name']] = $currVariable['value'];
}// END - if
preg_match_all($this->regExpCodeTags, $rawData, $templateMatches);
// Debug message
preg_match_all($this->regExpCodeTags, $rawData, $templateMatches);
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:templateMatches=' . print_r($templateMatches , true));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:templateMatches=' . print_r($templateMatches , true));
// Analyze the matches array
if ((is_array($templateMatches)) && (count($templateMatches) == 4) && (count($templateMatches[0]) > 0)) {
// Analyze the matches array
if ((is_array($templateMatches)) && (count($templateMatches) == 4) && (count($templateMatches[0]) > 0)) {
*/
public function compileRawCode ($rawCode, $setMatchAsCode=false) {
// Find the variables
*/
public function compileRawCode ($rawCode, $setMatchAsCode=false) {
// Find the variables
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
preg_match_all($this->regExpVarValue, $rawCode, $varMatches);
// Compile all variables
preg_match_all($this->regExpVarValue, $rawCode, $varMatches);
// Compile all variables
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:<pre>' . print_r($varMatches, true) . '</pre>');
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:<pre>' . print_r($varMatches, true) . '</pre>');
foreach ($varMatches[0] as $match) {
// Add variable tags around it
$varCode = '{?' . $match . '?}';
// Debug message
foreach ($varMatches[0] as $match) {
// Add variable tags around it
$varCode = '{?' . $match . '?}';
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:varCode=' . $varCode);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:varCode=' . $varCode);
// Is the variable found in code? (safes some calls)
if (strpos($rawCode, $varCode) !== false) {
// Debug message
// Is the variable found in code? (safes some calls)
if (strpos($rawCode, $varCode) !== false) {
// Debug message
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: match=' . $match . ',rawCode[' . gettype($rawCode) . ']=' . $rawCode);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: match=' . $match . ',rawCode[' . gettype($rawCode) . ']=' . $rawCode);
// Use $match as new value or $value from read variable?
if ($setMatchAsCode === true) {
// Use $match as new value or $value from read variable?
if ($setMatchAsCode === true) {
} // END - foreach
// Return the compiled data
} // END - foreach
// Return the compiled data
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE:rawCode=<pre>' . htmlentities($rawCode) . '</pre>');
* @return void
*/
public function renameVariable ($oldName, $newName) {
* @return void
*/
public function renameVariable ($oldName, $newName) {
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: oldName=' . $oldName . ', newName=' . $newName);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: oldName=' . $oldName . ', newName=' . $newName);
// Get raw template code
$rawData = $this->getRawTemplateData();
// Get raw template code
$rawData = $this->getRawTemplateData();
// Add last new-line
$proxyTunnel .= self::HTTP_EOL;
// Add last new-line
$proxyTunnel .= self::HTTP_EOL;
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: proxyTunnel=' . $proxyTunnel);
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONSOLE-TOOLS: proxyTunnel=' . $proxyTunnel);
// Write request
fwrite($socketResource, $proxyTunnel);
// Write request
fwrite($socketResource, $proxyTunnel);
- /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONSOLE-TOOLS[' . __METHOD__ . ':' . __LINE__ . ']: Resolved external address: ' . $externalAddress);
+ /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONSOLE-TOOLS: Resolved external address: ' . $externalAddress);
// Return determined external address
return $externalAddress;
// Return determined external address
return $externalAddress;
// Read all directories but no sub directories, .htaccess files and NullCompressor class
while ($directoryEntry = $directoryInstance->readDirectoryExcept(array('.htaccess', 'class_NullCompressor.php'))) {
// Debug message
// Read all directories but no sub directories, .htaccess files and NullCompressor class
while ($directoryEntry = $directoryInstance->readDirectoryExcept(array('.htaccess', 'class_NullCompressor.php'))) {
// Debug message
- //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMPRESSOR[' . __METHOD__ . ':' . __LINE__ . ']: directoryEntry=' . $directoryEntry);
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('COMPRESSOR: directoryEntry=' . $directoryEntry);
// Is this a class file?
if ((substr($directoryEntry, 0, 6) == 'class_') && (substr($directoryEntry, -4, 4) == '.php')) {
// Is this a class file?
if ((substr($directoryEntry, 0, 6) == 'class_') && (substr($directoryEntry, -4, 4) == '.php')) {