| 1 | <?php |
||
| 15 | class ValueObject implements ObjectInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var mixed Associated data |
||
| 19 | */ |
||
| 20 | public $data; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array Property collection |
||
| 24 | */ |
||
| 25 | protected $properties = array(); |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param mixed $data Associated data |
||
| 29 | * @param array $properties Properties |
||
| 30 | */ |
||
| 31 | 10 | public function __construct($data, array $properties = array()) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 1 | public function getProperties() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | 2 | public function getProperty($key) |
|
| 52 | |||
| 53 | /** |
||
| 54 | * {@inheritdoc} |
||
| 55 | */ |
||
| 56 | 2 | public function setProperty($key, $value) |
|
| 60 | |||
| 61 | /** |
||
| 62 | * {@inheritdoc} |
||
| 63 | */ |
||
| 64 | 1 | public function getData() |
|
| 68 | } |
||
| 69 |