예제 #1
0
 /**
  * @param string $fileExtension
  * @param string $basePath
  * @param int $imageType
  * @param string $mimeType
  * @param int $width
  * @param int $height
  * @param string|null $uriPrefix
  */
 public function __construct($fileExtension, $basePath, $imageType, $mimeType, $width, $height, $uriPrefix = null)
 {
     $this->id = Uuid::uuid4();
     $this->baseFileName = $this->id->getHex();
     $this->subPath = $this->buildSubPath();
     $this->fileExtension = (string) $fileExtension;
     $this->basePath = (string) $basePath;
     $this->imageType = (int) $imageType;
     $this->mimeType = (string) $mimeType;
     $this->width = (int) $width;
     $this->height = (int) $height;
     if ($uriPrefix !== null) {
         $this->uriPrefix = (string) $uriPrefix;
     }
 }
예제 #2
0
 /**
  * @param UuidInterface $orderItemId
  * @param int $quantity
  */
 public function addOrderItemQty(UuidInterface $orderItemId, $quantity)
 {
     if ($quantity > 0) {
         $this->items[$orderItemId->getHex()] = (int) $quantity;
     }
 }