1 | <?php |
||
14 | class WzClassification implements WzClassificationInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var WzItemInterface[] |
||
18 | */ |
||
19 | public $items = []; |
||
20 | |||
21 | /** |
||
22 | * @param WzItemInterface[] $items Unordered list of `WzItemInterface` objects. |
||
23 | * @throws InvalidArgumentException On `$items` which aren't `WzItemInterface` objects. |
||
24 | */ |
||
25 | 40 | public function __construct(array $items) |
|
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | 10 | public function count() |
|
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 20 | public function get($id) |
|
54 | |||
55 | /** |
||
56 | * @param int $level |
||
57 | * @return WzItemInterface[] |
||
58 | */ |
||
59 | 5 | public function getItemsByLevel($level) |
|
70 | |||
71 | /** |
||
72 | * @param string $id |
||
73 | * @return bool |
||
74 | */ |
||
75 | 20 | public function has($id) |
|
79 | } |
||
80 |