|
|
|
@ -70,6 +70,8 @@ class Object implements Arrayable
|
|
|
|
|
$getter = 'get' . $name; |
|
|
|
|
if (method_exists($this, $getter)) { |
|
|
|
|
return $this->$getter(); |
|
|
|
|
} elseif (method_exists($this, 'set' . $name)) { |
|
|
|
|
throw new InvalidCallException('Getting write-only property: ' . get_class($this) . '::' . $name); |
|
|
|
|
} else { |
|
|
|
|
throw new UnknownPropertyException('Getting unknown property: ' . get_class($this) . '::' . $name); |
|
|
|
|
} |
|
|
|
|