public static variableToString ( mixed $variable ) : string | ||
$variable | mixed | |
return | string |
public static function variableToString($variable)
{
if ($variable === null) {
return '<null>';
}
if ($variable === true) {
return '<true>';
}
if ($variable === false) {
return '<false>';
}
if (is_array($variable)) {
return '<array>';
}
if (is_object($variable)) {
return '<' . get_class($variable) . '>';
}
return $variable;
}
/** * Called after a variable has been set. * * @param ezcWorkflowExecution $execution * @param string $variableName * @param mixed $value */ public function afterVariableSet(ezcWorkflowExecution $execution, $variableName, $value) { $this->notifyListeners(sprintf('Set variable "%s" to "%s" for execution #%d of workflow "%s" (version %d).', $variableName, ezcWorkflowUtil::variableToString($value), $execution->getId(), $execution->workflow->name, $execution->workflow->version), ezcWorkflowExecutionListener::DEBUG); }