/** * Magic method to allow calls to extension methods */ public function __call($method, $args) { $methods = $this->getExtensionMethods(); if (isset($methods[$method])) { return call_user_func_array(array($this->_extensionObjects[$methods[$method]], $method), $args); } else { return parent::__call($method, $args); } }