has() 공개 메소드

public has ( string $id ) : boolean
$id string
리턴 boolean
예제 #1
0
 /**
  * @param ServiceLocator $serviceLocator
  * @throws ServiceNotFoundException
  */
 public function boot(ServiceLocator $serviceLocator)
 {
     if (!$serviceLocator->has(Services::KERNEL_TRANSACTION_FACTORY)) {
         throw new ServiceNotFoundException(sprintf('Service with id "%s" is missing in service locator.', Services::KERNEL_TRANSACTION_FACTORY));
     }
     $serviceLocator->get(Services::KERNEL_COMMAND_EXTENSION_REGISTRY)->register(new TransactionExtension($serviceLocator->get(Services::KERNEL_TRANSACTION_FACTORY)), -1024);
 }