renderer = new $rendererName($spreadsheet); } /** * Magic method to handle direct calls to the configured PDF renderer wrapper class. * * @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 PDF renderer wrapper method */ public function __call($name, $arguments) { if ($this->renderer === null) { throw new Exception('PDF Rendering library has not been defined.'); } return call_user_func_array([$this->renderer, $name], $arguments); } /** * {@inheritdoc} */ public function save($pFilename = null) { $this->renderer->save($pFilename); } }