| 1 | <?php |
||
| 9 | class Category |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var int |
||
| 13 | */ |
||
| 14 | private $id; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $title; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $url; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var Product[] |
||
| 28 | */ |
||
| 29 | private $products; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Category constructor. |
||
| 33 | * @param int $id |
||
| 34 | * @param string $title |
||
| 35 | * @param string $url |
||
| 36 | * @param Product[] $products |
||
| 37 | */ |
||
| 38 | public function __construct($id, $title, $url, $products) |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | public function getTitle() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return int |
||
| 56 | */ |
||
| 57 | public function getId() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @return string |
||
| 64 | */ |
||
| 65 | public function getUrl() |
||
| 69 | |||
| 70 | /** |
||
| 71 | * @return Product[] |
||
| 72 | */ |
||
| 73 | public function getProducts() |
||
| 77 | } |
||
| 78 |