| 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 | 24 | public function __construct(array $items) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @inheritdoc |
||
| 40 | */ |
||
| 41 | 6 | public function count() |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @inheritdoc |
||
| 48 | */ |
||
| 49 | 12 | public function get($id) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @param int $level |
||
| 56 | * @return WzItemInterface[] |
||
| 57 | */ |
||
| 58 | 3 | public function getItemsByLevel($level) |
|
| 67 | |||
| 68 | /** |
||
| 69 | * @param string $id |
||
| 70 | * @return bool |
||
| 71 | */ |
||
| 72 | 12 | public function has($id) |
|
| 76 | } |
||
| 77 |