Dumplie\CustomerService\Infrastructure\Doctrine\ORM\Domain\ORMPayments::getById PHP 메소드

getById() 공개 메소드

public getById ( PaymentId $paymentId ) : Payment
$paymentId Dumplie\CustomerService\Domain\PaymentId
리턴 Dumplie\CustomerService\Domain\Payment
    public function getById(PaymentId $paymentId) : Payment
    {
        $payment = $this->entityManager->getRepository(Payment::class)->findOneBy(['id.id' => $paymentId]);
        if (is_null($payment)) {
            throw new PaymentNotFoundException();
        }
        return $payment;
    }