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

Breadcrumb

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

function XmlDumper::addMethodCalls

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

File

vendor/symfony/dependency-injection/Dumper/XmlDumper.php, line 75

Class

XmlDumper
XmlDumper dumps a service container as an XML string.

Namespace

Symfony\Component\DependencyInjection\Dumper

Code

private function addMethodCalls(array $methodcalls, \DOMElement $parent) : void {
    foreach ($methodcalls as $methodcall) {
        $call = $this->document
            ->createElement('call');
        $call->setAttribute('method', $methodcall[0]);
        if (\count($methodcall[1])) {
            $this->convertParameters($methodcall[1], 'argument', $call);
        }
        if ($methodcall[2] ?? false) {
            $call->setAttribute('returns-clone', 'true');
        }
        $parent->appendChild($call);
    }
}
RSS feed
Powered by Drupal