It should be possible that a class that extends DatabaseObjectDecorator
is decorated again (basic principle of the decorator pattern) which isn'
t the case at the moment since the original object's methods can't be ca
lled anymore, so we need to check if the base class itself is a decorate
d object before the exception is thrown that the method doesn't exist.
* @return mixed
*/
public function __call($name, $arguments) {
- if (!method_exists($this->object, $name)) {
+ if (!method_exists($this->object, $name) && !($this->object instanceof DatabaseObjectDecorator)) {
throw new SystemException("unknown method '".$name."'");
}