1 | <?php |
||
11 | abstract class BaseIdNameEntity extends BaseNameEntity |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $id; |
||
17 | |||
18 | 4 | public function __construct(int $id, string $name) |
|
24 | |||
25 | /** |
||
26 | * @return int |
||
27 | */ |
||
28 | 3 | public function getId(): ?int |
|
32 | |||
33 | /** |
||
34 | * @param int $id |
||
35 | * |
||
36 | * @return BaseIdNameEntity |
||
37 | */ |
||
38 | 1 | public function setId(int $id): BaseIdNameEntity |
|
44 | |||
45 | /** |
||
46 | * @inheritDoc |
||
47 | */ |
||
48 | 1 | public function jsonSerialize(): array |
|
55 | } |