You are here

public function Definition::setSynchronized 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::setSynchronized()

Sets the synchronized flag of this service.

@api

Parameters

bool $boolean:

Return value

Definition The current instance

Deprecated

since version 2.7, will be removed in 3.0.

File

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

Class

Definition
Definition represents a service definition.

Namespace

Symfony\Component\DependencyInjection

Code

public function setSynchronized($boolean, $triggerDeprecationError = true) {
  if ($triggerDeprecationError) {
    trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
  }
  $this->synchronized = (bool) $boolean;
  return $this;
}