//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SEARCH-CRITERIA: key=%s,value[]=%s,separator=%s - CALLED!', $key, gettype($value), $separator));
if (empty($key)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "key" cannot be empty');
+ throw new InvalidArgumentException('Parameter "key" is empty');
} elseif (is_array($value) || is_bool($value) || is_bool($value) || is_object($value) || is_resource($value)) {
// Throw it again
throw new InvalidArgumentException(sprintf('value[]=%s is not supported/valid', gettype($value)));
} elseif (empty($separator)) {
// Throw IAE
- throw new InvalidArgumentException('Parameter "separator" cannot be empty');
+ throw new InvalidArgumentException('Parameter "separator" is empty');
}
// "Explode" value
// Misses an element?
if (count($resultArray) == 0) {
// Cannot be empty
- throw new InvalidArgumentException('Array "resultArray" cannot be empty.');
+ throw new InvalidArgumentException('Array "resultArray" is empty');
} elseif (!array_key_exists(BaseDatabaseResult::RESULT_NAME_ROWS, $resultArray)) {
// Yes, then abort here
throw new InvalidArgumentException(sprintf('resultArray(%d)=%s has no element "%s".', count($resultArray), print_r($resultArray, TRUE), BaseDatabaseResult::RESULT_NAME_ROWS));
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] columnSeparator=%s,expectedMatches=%d - CALLED!', __METHOD__, __LINE__, $columnSeparator, $expectedMatches));
if (strlen($columnSeparator) === 0) {
// No empty column separator
- throw new InvalidArgumentException('columnSeparator cannot be empty.');
+ throw new InvalidArgumentException('Parameter "columnSeparator" is empty');
} elseif ($expectedMatches < 0) {
// Below zero is not valid
throw new InvalidArgumentException(sprintf('expectedMatches=%d is below zero', $expectedMatches));
// 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: 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?
+ //* 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']);
if ((($diff < $currentTask['task_interval_delay']) && ($currentTask['task_max_runs'] == 0)) || (($currentTask['task_max_runs'] > 0) && ($currentTask['task_total_runs'] == $currentTask['task_max_runs']))) {
// Should we update the task from startup?
if ($updateTask === true) {
// Is the parameter valid
if (empty($taskName)) {
// Task name cannot be empty
- throw new InvalidArgumentException('Parameter "taskName" cannot be empty.');
+ throw new InvalidArgumentException('Parameter "taskName" is empty');
}
// Get interval delay, startup delay and max runs