_renderer = new $rendererName($phpExcel); } /** * Magic method to handle direct calls to the renderer library * * @param string $name Renderer library method name * @param mixed[] $arguments Array of arguments to pass to the renderer method * @return mixed Returned data from the renderer method */ public function __call($name, $arguments) { if ($this->_renderer === NULL) { throw new PHPExcel_Writer_Exception("PDF Renderer has not been defined."); } return call_user_func_array(array($this->_renderer, $name), $arguments); } }