definitionExists() публичный Метод

public definitionExists ( string $id ) : boolean
$id string
Результат boolean
Пример #1
0
 /**
  * @param ServiceContainer $serviceContainer
  * @throws ServiceNotFoundException
  */
 public function build(ServiceContainer $serviceContainer)
 {
     if (!$serviceContainer->definitionExists(Services::KERNEL_SERVICE_LOCATOR)) {
         throw new ServiceNotFoundException(sprintf('Service with id "%s" is missing in service container.', Services::KERNEL_SERVICE_LOCATOR));
     }
     $this->registerCommandServices($serviceContainer);
     $this->registerMetadataServices($serviceContainer);
 }