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

Breadcrumb

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

function YamlDumper::dumpCallable

Dumps callable to YAML format.

1 call to YamlDumper::dumpCallable()
YamlDumper::addService in vendor/symfony/dependency-injection/Dumper/YamlDumper.php

File

vendor/symfony/dependency-injection/Dumper/YamlDumper.php, line 231

Class

YamlDumper
YamlDumper dumps a service container as a YAML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function dumpCallable(mixed $callable) : mixed {
    if (\is_array($callable)) {
        if ($callable[0] instanceof Reference) {
            $callable = [
                $this->getServiceCall((string) $callable[0], $callable[0]),
                $callable[1],
            ];
        }
        else {
            $callable = [
                $callable[0],
                $callable[1],
            ];
        }
    }
    return $callable;
}

API Navigation

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