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