1 | <?php |
||
49 | class Item implements ItemInterface |
||
50 | { |
||
51 | /** |
||
52 | * Use the setup methods |
||
53 | */ |
||
54 | use ItemSetupTrait; |
||
55 | |||
56 | /** |
||
57 | * Item constructor |
||
58 | * |
||
59 | * @param string|\stdClass|\stdClass[] $type Item type(s) |
||
60 | * @param \stdClass[] $properties Item properties |
||
61 | * @param string|null $itemId Item id |
||
62 | * @param string|null $itemLanguage Item language |
||
63 | * @param PropertyListFactoryInterface|null $propertyListFactory Property list factory |
||
64 | */ |
||
65 | 54 | public function __construct( |
|
80 | |||
81 | /** |
||
82 | * Return the item types |
||
83 | * |
||
84 | * @return \stdClass[] Item types |
||
85 | */ |
||
86 | 26 | public function getType() |
|
90 | |||
91 | /** |
||
92 | * Return the item ID (if any) |
||
93 | * |
||
94 | * @return string|null Item id |
||
95 | */ |
||
96 | 21 | public function getId() |
|
100 | |||
101 | /** |
||
102 | * Return the item language (if any) |
||
103 | * |
||
104 | * @return string|null Item language |
||
105 | */ |
||
106 | 20 | public function getLanguage() |
|
110 | |||
111 | /** |
||
112 | * Return all item properties |
||
113 | * |
||
114 | * @return PropertyListInterface Item properties list |
||
115 | */ |
||
116 | 21 | public function getProperties() |
|
120 | |||
121 | /** |
||
122 | * Return the values of a particular property |
||
123 | * |
||
124 | * @param string|\stdClass|Iri $name Property name |
||
125 | * @param string|null $profile Property profile |
||
126 | * @return array Item property values |
||
127 | */ |
||
128 | 11 | public function getProperty($name, $profile = null) |
|
140 | |||
141 | /** |
||
142 | * Return whether the value should be considered empty |
||
143 | * |
||
144 | * @return boolean Value is empty |
||
145 | */ |
||
146 | 25 | public function isEmpty() |
|
150 | } |
||
151 |