You are here

public function Reference::__construct in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Reference.php \Symfony\Component\DependencyInjection\Reference::__construct()

Constructor.

Parameters

string $id The service identifier:

int $invalidBehavior The behavior when the service does not exist:

bool $strict Sets how this reference is validated:

See also

Container

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Reference.php, line 36

Class

Reference
Reference represents a service reference.

Namespace

Symfony\Component\DependencyInjection

Code

public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, $strict = true) {
  $this->id = strtolower($id);
  $this->invalidBehavior = $invalidBehavior;
  $this->strict = $strict;
}