Dumplie\Customer\Infrastructure\InMemory\InMemoryProducts::getBySku PHP 메소드

getBySku() 공개 메소드

public getBySku ( SKU $sku ) : Product
$sku Dumplie\SharedKernel\Domain\Product\SKU
리턴 Dumplie\Customer\Domain\Product
    public function getBySku(SKU $sku) : Product
    {
        if (!array_key_exists((string) $sku, $this->products)) {
            throw ProductNotFoundException::bySku($sku);
        }
        return $this->products[(string) $sku];
    }
InMemoryProducts