@@ 43-49 (lines=7) @@ | ||
40 | * @throws \Marek\Toggable\API\Exception\PropertyNotFoundException |
|
41 | * @throws \Marek\Toggable\API\Exception\PropertyReadOnlyException |
|
42 | */ |
|
43 | public function __get($property) |
|
44 | { |
|
45 | if (property_exists($this, $property)) { |
|
46 | ||
47 | return $this->$property; |
|
48 | ||
49 | } |
|
50 | throw new PropertyNotFoundException($property, get_class($this)); |
|
51 | } |
|
52 | ||
@@ 62-69 (lines=8) @@ | ||
59 | * @throws \Marek\Toggable\API\Exception\PropertyNotFoundException |
|
60 | * @throws \Marek\Toggable\API\Exception\PropertyReadOnlyException |
|
61 | */ |
|
62 | public function __set($property, $value) |
|
63 | { |
|
64 | if (property_exists($this, $property)) { |
|
65 | ||
66 | $this->$property = $value; |
|
67 | ||
68 | } else { |
|
69 | ||
70 | throw new PropertyNotFoundException($property, get_class($this)); |
|
71 | ||
72 | } |