Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- class Product
- {
- /** @var int */
- private $id;
- /** @var string */
- private $sku;
- public function __construct(int $id, string $sku)
- {
- $this->id = $id;
- $this->sku = $sku;
- }
- public function getId(): int
- {
- return $this->id;
- }
- public function setId(int $id): void
- {
- $this->id = $id;
- }
- public function getSku(): string
- {
- return $this->sku;
- }
- public function setSku(string $sku): void
- {
- $this->sku = $sku;
- }
- public function __toString(): string
- {
- return "Product: " . $this->sku;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement