| @@ 40-42 (lines=3) @@ | ||
| 37 | ||
| 38 | public function __set($name, $value) |
|
| 39 | { |
|
| 40 | if (!$this->exists($name) && $this->exists(lcfirst($name))) { |
|
| 41 | $name = lcfirst($name); |
|
| 42 | } |
|
| 43 | ||
| 44 | $this->$name = $value; |
|
| 45 | } |
|
| @@ 58-60 (lines=3) @@ | ||
| 55 | $name = "get$name"; |
|
| 56 | } |
|
| 57 | ||
| 58 | if (!$this->exists($name) && $this->exists(lcfirst($name))) { |
|
| 59 | $name = lcfirst($name); |
|
| 60 | } |
|
| 61 | ||
| 62 | if (!$this->exists($name)) { |
|
| 63 | throw new \Exception('Property ' . $name . ' does not exist'); |
|
| @@ 71-73 (lines=3) @@ | ||
| 68 | ||
| 69 | public function set($name, $value) |
|
| 70 | { |
|
| 71 | if (!$this->exists($name) && $this->exists(lcfirst($name))) { |
|
| 72 | $name = lcfirst($name); |
|
| 73 | } |
|
| 74 | ||
| 75 | if (!$this->exists($name)) { |
|
| 76 | throw new \Exception('Property ' . $name . ' does not exist'); |
|
| @@ 90-92 (lines=3) @@ | ||
| 87 | ||
| 88 | public function add($name, $value) |
|
| 89 | { |
|
| 90 | if (!$this->exists($name) && $this->exists(lcfirst($name))) { |
|
| 91 | $name = lcfirst($name); |
|
| 92 | } |
|
| 93 | ||
| 94 | if (!$this->exists($name)) { |
|
| 95 | throw new \Exception('Property ' . $name . ' does not exist'); |
|