Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HandlerStack.php

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

GuzzleHttp

Code

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) . ')';
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal