/**
  * {@inheritdoc}
  */
 public function getBinding(Uuid $uuid)
 {
     $this->assertPackagesLoaded();
     if (!$this->bindingDescriptors->contains($uuid)) {
         throw NoSuchBindingException::forUuid($uuid);
     }
     return $this->bindingDescriptors->get($uuid);
 }
Esempio n. 2
0
 /**
  * Returns the binding descriptor with the given UUID.
  *
  * @param Uuid $uuid The UUID of the binding descriptor.
  *
  * @return BindingDescriptor The binding descriptor.
  *
  * @throws NoSuchBindingException If the UUID was not found.
  */
 public function getBindingDescriptor(Uuid $uuid)
 {
     $uuidString = $uuid->toString();
     if (!isset($this->bindingDescriptors[$uuidString])) {
         throw NoSuchBindingException::forUuid($uuid);
     }
     return $this->bindingDescriptors[$uuidString];
 }