function HandlerStack::debugCallable
Provides a debug string for a given callable.
Parameters
callable|string $fn Function to write as a string.:
1 call to HandlerStack::debugCallable()
- HandlerStack::__toString in vendor/
guzzlehttp/ guzzle/ src/ HandlerStack.php - Dumps a string representation of the stack.
File
-
vendor/
guzzlehttp/ guzzle/ src/ HandlerStack.php, line 260
Class
- HandlerStack
- Creates a composed Guzzle handler function by stacking middlewares on top of an HTTP handler function.
Namespace
GuzzleHttpCode
private function debugCallable($fn) : string {
if (\is_string($fn)) {
return "callable({$fn})";
}
if (\is_array($fn)) {
return \is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])";
}
/** @var object $fn */
return 'callable(' . \spl_object_hash($fn) . ')';
}