| 1 | <?php |
||
| 12 | abstract class ValueObject |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Construct object optionally with a set of properties. |
||
| 16 | * |
||
| 17 | * Readonly properties values must be set using $properties as they are not writable anymore |
||
| 18 | * after object has been created. |
||
| 19 | * |
||
| 20 | * @param array $properties |
||
| 21 | * |
||
| 22 | * @throws \Marek\Toggable\API\Exception\PropertyNotFoundException |
||
| 23 | */ |
||
| 24 | 303 | public function __construct(array $properties = array()) |
|
| 34 | |||
| 35 | |||
| 36 | /** |
||
| 37 | * @param $property |
||
| 38 | * |
||
| 39 | * @return mixed |
||
| 40 | * |
||
| 41 | * @throws \Marek\Toggable\API\Exception\PropertyNotFoundException |
||
| 42 | */ |
||
| 43 | public function __get($property) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Magic isset function handling isset() to non public properties. |
||
| 53 | * |
||
| 54 | * Returns true for all (public/)protected/private properties. |
||
| 55 | * |
||
| 56 | * @ignore This method is for internal use |
||
| 57 | * |
||
| 58 | * @param string $property Name of the property |
||
| 59 | * |
||
| 60 | * @return bool |
||
| 61 | */ |
||
| 62 | public function __isset($property) |
||
| 66 | } |
||
| 67 |