1 | <?php |
||
18 | class Type implements TypeInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var int|string |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $name; |
||
29 | |||
30 | 10 | public function __construct($id, $name = null) |
|
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | 4 | public function getId() |
|
40 | { |
||
41 | 4 | return $this->id; |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | 8 | public function getName() |
|
51 | |||
52 | 2 | public function getUniqueId() |
|
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | 2 | public function equals(TypeInterface $other) |
|
65 | |||
66 | 6 | public function matches(TypeInterface $other) |
|
72 | |||
73 | public function jsonSerialize() |
||
80 | } |
||
81 |