| 1 | <?php |
||
| 14 | class Item implements ItemInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Item's identifier. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $id; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Item properties. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $properties = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Item constructor. |
||
| 32 | * |
||
| 33 | * @param string $id |
||
| 34 | */ |
||
| 35 | public function __construct(string $id) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | public function setId(string $id): BaseInterface |
||
| 49 | |||
| 50 | /** |
||
| 51 | * {@inheritdoc} |
||
| 52 | */ |
||
| 53 | public function getId(): string |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Implement ArrayAccess. |
||
| 60 | * |
||
| 61 | * @param mixed $offset |
||
| 62 | * |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | public function offsetExists($offset) |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Implement ArrayAccess. |
||
| 72 | * |
||
| 73 | * @param mixed $offset |
||
| 74 | * |
||
| 75 | * @return null |
||
| 76 | */ |
||
| 77 | public function offsetGet($offset) |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Implement ArrayAccess. |
||
| 84 | * |
||
| 85 | * @param mixed $offset |
||
| 86 | * @param mixed $value |
||
| 87 | */ |
||
| 88 | public function offsetSet($offset, $value) |
||
| 92 | |||
| 93 | /** |
||
| 94 | * Implement ArrayAccess. |
||
| 95 | * |
||
| 96 | * @param mixed $offset |
||
| 97 | */ |
||
| 98 | public function offsetUnset($offset) |
||
| 102 | |||
| 103 | /** |
||
| 104 | * {@inheritdoc} |
||
| 105 | */ |
||
| 106 | public function toArray(): array |
||
| 110 | } |
||
| 111 |