addMethodCalls example

$service->appendChild($file);
        }

        if ($parameters = $definition->getArguments()) {
            $this->convertParameters($parameters, 'argument', $service);
        }

        if ($parameters = $definition->getProperties()) {
            $this->convertParameters($parameters, 'property', $service, 'name');
        }

        $this->addMethodCalls($definition->getMethodCalls()$service);

        if ($callable = $definition->getFactory()) {
            if (\is_array($callable) && ['Closure', 'fromCallable'] !== $callable && $definition->getClass() === $callable[0]) {
                $service->setAttribute('constructor', $callable[1]);
            } else {
                $factory = $this->document->createElement('factory');

                if (\is_array($callable) && $callable[0] instanceof Definition) {
                    $this->addService($callable[0], null, $factory);
                    $factory->setAttribute('method', $callable[1]);
                } elseif (\is_array($callable)) {
                    
$service->appendChild($file);
        }

        if ($parameters = $definition->getArguments()) {
            $this->convertParameters($parameters, 'argument', $service);
        }

        if ($parameters = $definition->getProperties()) {
            $this->convertParameters($parameters, 'property', $service, 'name');
        }

        $this->addMethodCalls($definition->getMethodCalls()$service);

        if ($callable = $definition->getFactory()) {
            if (\is_array($callable) && ['Closure', 'fromCallable'] !== $callable && $definition->getClass() === $callable[0]) {
                $service->setAttribute('constructor', $callable[1]);
            } else {
                $factory = $this->document->createElement('factory');

                if (\is_array($callable) && $callable[0] instanceof Definition) {
                    $this->addService($callable[0], null, $factory);
                    $factory->setAttribute('method', $callable[1]);
                } elseif (\is_array($callable)) {
                    
Home | Imprint | This part of the site doesn't use cookies.