Guest User

Untitled

a guest
Oct 1st, 2020
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. class Product
  6. {
  7.     /** @var int */
  8.     private $id;
  9.  
  10.     /** @var string */
  11.     private $sku;
  12.  
  13.     public function __construct(int $id, string $sku)
  14.     {
  15.         $this->id  = $id;
  16.         $this->sku = $sku;
  17.     }
  18.  
  19.     public function getId(): int
  20.     {
  21.         return $this->id;
  22.     }
  23.  
  24.     public function setId(int $id): void
  25.     {
  26.         $this->id = $id;
  27.     }
  28.  
  29.     public function getSku(): string
  30.     {
  31.         return $this->sku;
  32.     }
  33.  
  34.     public function setSku(string $sku): void
  35.     {
  36.         $this->sku = $sku;
  37.     }
  38.  
  39.     public function __toString(): string
  40.     {
  41.         return "Product: " . $this->sku;
  42.     }
  43. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×