Dumplie\CustomerService\Domain\Orders::getById PHP Method

getById() public method

public getById ( OrderId $orderId ) : Order
$orderId OrderId
return Order
    public function getById(OrderId $orderId) : Order;

Usage Example

Beispiel #1
0
 /**
  * @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