trait CallTrait
Hierarchy
- trait \Symfony\Component\DependencyInjection\Loader\Configurator\Traits\CallTrait
File
-
vendor/
symfony/ dependency-injection/ Loader/ Configurator/ Traits/ CallTrait.php, line 16
Namespace
Symfony\Component\DependencyInjection\Loader\Configurator\TraitsView source
trait CallTrait {
/**
* Adds a method to call after service initialization.
*
* @param string $method The method name to call
* @param array $arguments An array of arguments to pass to the method call
* @param bool $returnsClone Whether the call returns the service instance or not
*
* @return $this
*
* @throws InvalidArgumentException on empty $method param
*/
public final function call(string $method, array $arguments = [], bool $returnsClone = false) : static {
$this->definition
->addMethodCall($method, static::processValue($arguments, true), $returnsClone);
return $this;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
CallTrait::call | final public | function | Adds a method to call after service initialization. |