Adds a method to call after service initialization.
@api
string $method The method name to call:
array $arguments An array of arguments to pass to the method call:
Definition The current instance
InvalidArgumentException on empty $method param
public function addMethodCall($method, array $arguments = array()) {
if (empty($method)) {
throw new InvalidArgumentException(sprintf('Method name cannot be empty.'));
}
$this->calls[] = array(
$method,
$arguments,
);
return $this;
}