Dumplie\CustomerService\Domain\Orders::getById PHP Méthode

getById() public méthode

public getById ( OrderId $orderId ) : Order
$orderId OrderId
Résultat Order
    public function getById(OrderId $orderId) : Order;

Usage Example

 /**
  * @param AcceptOrder $command
  * @throws OrderNotFoundException
  * @throws InvalidTransitionException
  */
 public function handle(AcceptOrder $command)
 {
     $order = $this->orders->getById(new OrderId($command->orderId()));
     $order->accept();
 }
All Usage Examples Of Dumplie\CustomerService\Domain\Orders::getById