*/ class MethodInjection extends AbstractFunctionCallDefinition { /** * @var string */ private $methodName; /** * @param string $methodName * @param array $parameters */ public function __construct($methodName, array $parameters = []) { $this->methodName = (string) $methodName; $this->parameters = $parameters; } public static function constructor(array $parameters = []) { return new self('__construct', $parameters); } /** * @return string Method name */ public function getMethodName() { return $this->methodName; } public function merge(MethodInjection $definition) { // In case of conflicts, the current definition prevails. $this->parameters = $this->parameters + $definition->parameters; } }