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

Breadcrumb

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

function ClassStub::wrapCallable

1 call to ClassStub::wrapCallable()
RedisCaster::castRedisArray in vendor/symfony/var-dumper/Caster/RedisCaster.php

File

vendor/symfony/var-dumper/Caster/ClassStub.php, line 88

Class

ClassStub
Represents a PHP class identifier.

Namespace

Symfony\Component\VarDumper\Caster

Code

public static function wrapCallable(mixed $callable) : mixed {
    if (\is_object($callable) || !\is_callable($callable)) {
        return $callable;
    }
    if (!\is_array($callable)) {
        $callable = new static($callable, $callable);
    }
    elseif (\is_string($callable[0])) {
        $callable[0] = new static($callable[0], $callable);
    }
    else {
        $callable[1] = new static($callable[1], $callable);
    }
    return $callable;
}

API Navigation

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