| 1 | <?php declare(strict_types = 1); |
||
| 17 | class CollectionItem |
||
| 18 | { |
||
| 19 | /** @var mixed Key of item */ |
||
| 20 | protected $key; |
||
| 21 | /** @var mixed Value of item */ |
||
| 22 | protected $value; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * CollectionItem constructor. |
||
| 26 | * |
||
| 27 | * @param ReferenceInterface $key |
||
| 28 | * @param ReferenceInterface $value |
||
| 29 | */ |
||
| 30 | 18 | public function __construct(ReferenceInterface $key, ReferenceInterface $value) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return mixed |
||
| 38 | */ |
||
| 39 | 14 | public function getKey() |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @return mixed |
||
| 46 | */ |
||
| 47 | 12 | public function getValue() |
|
| 51 | |||
| 52 | /** |
||
| 53 | * Create collection item from php type |
||
| 54 | * |
||
| 55 | * @param $key |
||
| 56 | * @param $value |
||
| 57 | * @return CollectionItem |
||
| 58 | * @throws ReferenceNotImplementsException |
||
| 59 | * @throws \InvalidArgumentException |
||
| 60 | */ |
||
| 61 | 9 | public static function create($key, $value) |
|
| 68 | } |
||
| 69 |