ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Writer_PDF Class Reference
+ Inheritance diagram for PHPExcel_Writer_PDF:
+ Collaboration diagram for PHPExcel_Writer_PDF:

Public Member Functions

 __construct (PHPExcel $phpExcel)
 Instantiate a new renderer of the configured type within this container class. More...
 
 __call ($name, $arguments)
 Magic method to handle direct calls to the configured PDF renderer wrapper class. More...
 
 save ($pFilename=null)
 {Save PHPExcel to file.
Parameters
string$pFilenameName of the file to save
Exceptions
PHPExcel_Writer_Exception
} More...
 

Private Attributes

 $_renderer = NULL
 

Detailed Description

Definition at line 36 of file PDF.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Writer_PDF::__construct ( PHPExcel  $phpExcel)

Instantiate a new renderer of the configured type within this container class.

Parameters
PHPExcel$phpExcelPHPExcel object
Exceptions
PHPExcel_Writer_Exceptionwhen PDF library is not configured

Definition at line 52 of file PDF.php.

References $rendererName, PHPExcel_Settings\getPdfRendererName(), and PHPExcel_Settings\getPdfRendererPath().

53  {
54  $pdfLibraryName = PHPExcel_Settings::getPdfRendererName();
55  if (is_null($pdfLibraryName)) {
56  throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined.");
57  }
58 
59  $pdfLibraryPath = PHPExcel_Settings::getPdfRendererPath();
60  if (is_null($pdfLibraryName)) {
61  throw new PHPExcel_Writer_Exception("PDF Rendering library path has not been defined.");
62  }
63  $includePath = str_replace('\\', '/', get_include_path());
64  $rendererPath = str_replace('\\', '/', $pdfLibraryPath);
65  if (strpos($rendererPath, $includePath) === false) {
66  set_include_path(get_include_path() . PATH_SEPARATOR . $pdfLibraryPath);
67  }
68 
69  $rendererName = 'PHPExcel_Writer_PDF_' . $pdfLibraryName;
70  $this->_renderer = new $rendererName($phpExcel);
71  }
static getPdfRendererPath()
Return the directory path to the PDF Rendering Library that PHPExcel is currently configured to use...
Definition: Settings.php:354
static getPdfRendererName()
Return the PDF Rendering Library that PHPExcel is currently configured to use (e.g.
Definition: Settings.php:343
$rendererName
Include PHPExcel.
+ Here is the call graph for this function:

Member Function Documentation

◆ __call()

PHPExcel_Writer_PDF::__call (   $name,
  $arguments 
)

Magic method to handle direct calls to the configured PDF renderer wrapper class.

Parameters
string$nameRenderer library method name
mixed[]$arguments Array of arguments to pass to the renderer method
Returns
mixed Returned data from the PDF renderer wrapper method

Definition at line 81 of file PDF.php.

References $name, and array.

82  {
83  if ($this->_renderer === NULL) {
84  throw new PHPExcel_Writer_Exception("PDF Rendering library has not been defined.");
85  }
86 
87  return call_user_func_array(array($this->_renderer, $name), $arguments);
88  }
if($format !==null) $name
Definition: metadata.php:146
Create styles array
The data for the language used.

◆ save()

PHPExcel_Writer_PDF::save (   $pFilename = null)

{Save PHPExcel to file.

Parameters
string$pFilenameName of the file to save
Exceptions
PHPExcel_Writer_Exception
}

Implements PHPExcel_Writer_IWriter.

Definition at line 93 of file PDF.php.

94  {
95  $this->_renderer->save($pFilename);
96  }

Field Documentation

◆ $_renderer

PHPExcel_Writer_PDF::$_renderer = NULL
private

Definition at line 44 of file PDF.php.


The documentation for this class was generated from the following file: