1 | <?php |
||
16 | class Category implements SerializableInterface, JsonLdSerializableInterface |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * The category ID. |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * The category label. |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $label; |
||
30 | |||
31 | /** |
||
32 | * The domain. |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $domain; |
||
36 | |||
37 | public function __construct($id, $label, $domain) |
||
52 | |||
53 | public function getId() |
||
57 | |||
58 | public function getLabel() |
||
62 | |||
63 | public function getDomain() |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function serialize() |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public static function deserialize(array $data) |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function toJsonLd() |
||
98 | |||
99 | /** |
||
100 | * @param Udb3ModelCategory $category |
||
101 | * @return static |
||
102 | */ |
||
103 | public static function fromUdb3ModelCategory(Udb3ModelCategory $category) |
||
119 | } |
||
120 |