You are here

public function Definition::setMethodCalls in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Definition.php \Symfony\Component\DependencyInjection\Definition::setMethodCalls()

Sets the methods to call after service initialization.

@api

Parameters

array $calls An array of method calls:

Return value

Definition The current instance

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Definition.php, line 384

Class

Definition
Definition represents a service definition.

Namespace

Symfony\Component\DependencyInjection

Code

public function setMethodCalls(array $calls = array()) {
  $this->calls = array();
  foreach ($calls as $call) {
    $this
      ->addMethodCall($call[0], $call[1]);
  }
  return $this;
}