@@ 83-85 (lines=3) @@ | ||
80 | $setter = 'set' . $name; |
|
81 | if ($this->hasMethod($setter)) { |
|
82 | $this->$setter($value); |
|
83 | } elseif ($this->hasMethod('get' . $name)) { |
|
84 | throw new InvalidAccessException('Setting read-only property: ' . static::class . '::' . $name); |
|
85 | } else { |
|
86 | throw new UndefinedPropertyException('Setting unknown property: ' . static::class . '::' . $name); |
|
87 | } |
|
88 | } |
|
@@ 150-152 (lines=3) @@ | ||
147 | $setter = 'set' . $name; |
|
148 | if ($this->hasMethod($setter)) { |
|
149 | $this->$setter(null); |
|
150 | } elseif ($this->hasMethod('get' . $name)) { |
|
151 | throw new InvalidAccessException('Unsetting read-only property: ' . static::class . '::' . $name); |
|
152 | } |
|
153 | } |
|
154 | ||
155 | /** |