src/Definition/ObjectDefinition.php
public function addMethodCall($methodName, array $arguments = array())
    {
        $this->actions[] = $methodCall = new MethodCall($methodName, $arguments);

        return $methodCall;
    }
public function addMethodCall($methodName, array $arguments = array())
    {
        $this->actions[] = $methodCall = new MethodCall($methodName, $arguments);

        return $methodCall;
    }
Adds a method call.

@param string $methodName
@param array  $arguments

@return MethodCall