public function fingerprintCallback($callback)
{
if (is_string($callback)) {
return $callback;
}
if (is_object($callback)) {
return spl_object_hash($callback) . "::__invoke";
}
if (is_array($callback)) {
if (is_string($callback[0])) {
return "{$callback[0]}::{$callback[1]}";
}
return spl_object_hash($callback[0]) . "::{$callback[1]}";
}
// this should not happen
return "";
}