Dumplie\CustomerService\Infrastructure\Doctrine\ORM\Domain\ORMOrders::getById PHP Method

getById() public method

public getById ( OrderId $orderId ) : Dumplie\CustomerService\Domain\Order
$orderId Dumplie\CustomerService\Domain\OrderId
return Dumplie\CustomerService\Domain\Order
    public function getById(OrderId $orderId) : Order
    {
        $order = $this->entityManager->getRepository(Order::class)->findOneBy(['id.id' => $orderId]);
        if (is_null($order)) {
            throw new OrderNotFoundException();
        }
        return $order;
    }