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...
 
 save ($pFilename=NULL)
 Save PHPExcel to file. 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.

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 }
$rendererName
Include PHPExcel.
static getPdfRendererName()
Return the PDF Rendering Library that PHPExcel is currently configured to use (e.g.
Definition: Settings.php:343
static getPdfRendererPath()
Return the directory path to the PDF Rendering Library that PHPExcel is currently configured to use.
Definition: Settings.php:354

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

+ 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[]$argumentsArray 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.

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

References $name.

◆ 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: