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

getById() public method

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