ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Settings.php
Go to the documentation of this file.
1<?php
29if (!defined('PHPEXCEL_ROOT')) {
33 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../');
34 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
35}
36
37
39{
42 const PCLZIP = 'PHPExcel_Shared_ZipArchive';
43 const ZIPARCHIVE = 'ZipArchive';
44
46 const CHART_RENDERER_JPGRAPH = 'jpgraph';
47
49 const PDF_RENDERER_TCPDF = 'tcPDF';
50 const PDF_RENDERER_DOMPDF = 'DomPDF';
51 const PDF_RENDERER_MPDF = 'mPDF';
52
53
54 private static $_chartRenderers = array(
55 self::CHART_RENDERER_JPGRAPH,
56 );
57
58 private static $_pdfRenderers = array(
59 self::PDF_RENDERER_TCPDF,
60 self::PDF_RENDERER_DOMPDF,
61 self::PDF_RENDERER_MPDF,
62 );
63
64
72 private static $_zipClass = self::ZIPARCHIVE;
73
74
82 private static $_chartRendererName = NULL;
83
89 private static $_chartRendererPath = NULL;
90
91
99 private static $_pdfRendererName = NULL;
100
106 private static $_pdfRendererPath = NULL;
107
113 private static $_libXmlLoaderOptions = null;
114
122 public static function setZipClass($zipClass)
123 {
124 if (($zipClass === self::PCLZIP) ||
125 ($zipClass === self::ZIPARCHIVE)) {
126 self::$_zipClass = $zipClass;
127 return TRUE;
128 }
129 return FALSE;
130 } // function setZipClass()
131
132
141 public static function getZipClass()
142 {
143 return self::$_zipClass;
144 } // function getZipClass()
145
146
152 public static function getCacheStorageMethod()
153 {
155 } // function getCacheStorageMethod()
156
157
163 public static function getCacheStorageClass()
164 {
166 } // function getCacheStorageClass()
167
168
176 public static function setCacheStorageMethod(
178 $arguments = array()
179 )
180 {
181 return PHPExcel_CachedObjectStorageFactory::initialize($method, $arguments);
182 } // function setCacheStorageMethod()
183
184
191 public static function setLocale($locale='en_us')
192 {
193 return PHPExcel_Calculation::getInstance()->setLocale($locale);
194 } // function setLocale()
195
196
206 public static function setChartRenderer($libraryName, $libraryBaseDir)
207 {
208 if (!self::setChartRendererName($libraryName))
209 return FALSE;
210 return self::setChartRendererPath($libraryBaseDir);
211 } // function setChartRenderer()
212
213
222 public static function setChartRendererName($libraryName)
223 {
224 if (!in_array($libraryName,self::$_chartRenderers)) {
225 return FALSE;
226 }
227
228 self::$_chartRendererName = $libraryName;
229
230 return TRUE;
231 } // function setChartRendererName()
232
233
240 public static function setChartRendererPath($libraryBaseDir)
241 {
242 if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) {
243 return FALSE;
244 }
245 self::$_chartRendererPath = $libraryBaseDir;
246
247 return TRUE;
248 } // function setChartRendererPath()
249
250
258 public static function getChartRendererName()
259 {
261 } // function getChartRendererName()
262
263
270 public static function getChartRendererPath()
271 {
273 } // function getChartRendererPath()
274
275
287 public static function setPdfRenderer($libraryName, $libraryBaseDir)
288 {
289 if (!self::setPdfRendererName($libraryName))
290 return FALSE;
291 return self::setPdfRendererPath($libraryBaseDir);
292 } // function setPdfRenderer()
293
294
305 public static function setPdfRendererName($libraryName)
306 {
307 if (!in_array($libraryName,self::$_pdfRenderers)) {
308 return FALSE;
309 }
310
311 self::$_pdfRendererName = $libraryName;
312
313 return TRUE;
314 } // function setPdfRendererName()
315
316
323 public static function setPdfRendererPath($libraryBaseDir)
324 {
325 if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) {
326 return FALSE;
327 }
328 self::$_pdfRendererPath = $libraryBaseDir;
329
330 return TRUE;
331 } // function setPdfRendererPath()
332
333
343 public static function getPdfRendererName()
344 {
346 } // function getPdfRendererName()
347
354 public static function getPdfRendererPath()
355 {
357 } // function getPdfRendererPath()
358
364 public static function setLibXmlLoaderOptions($options = null)
365 {
366 if (is_null($options) && defined(LIBXML_DTDLOAD)) {
367 $options = LIBXML_DTDLOAD | LIBXML_DTDATTR;
368 }
369 if (version_compare(PHP_VERSION, '5.2.11') >= 0) {
370 @libxml_disable_entity_loader($options == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
371 }
372 self::$_libXmlLoaderOptions = $options;
373 } // function setLibXmlLoaderOptions
374
381 public static function getLibXmlLoaderOptions()
382 {
383 if (is_null(self::$_libXmlLoaderOptions) && defined(LIBXML_DTDLOAD)) {
384 self::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR);
385 }
386 if (version_compare(PHP_VERSION, '5.2.11') >= 0) {
387 @libxml_disable_entity_loader(self::$_libXmlLoaderOptions == (LIBXML_DTDLOAD | LIBXML_DTDATTR));
388 }
390 } // function getLibXmlLoaderOptions
391}
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
An exception for terminatinating execution or to throw for unit testing.
static getCacheStorageClass()
Return the current cache storage class.
static getCacheStorageMethod()
Return the current cache storage method.
static initialize($method=self::cache_in_memory, $arguments=array())
Identify the cache storage method to use.
static getInstance(PHPExcel $workbook=NULL)
Get an instance of this class.
static setPdfRendererPath($libraryBaseDir)
Tell PHPExcel where to find the external library to use for rendering PDF files.
Definition: Settings.php:323
static $_chartRenderers
Definition: Settings.php:54
static setChartRendererPath($libraryBaseDir)
Tell PHPExcel where to find the external library to use for rendering charts.
Definition: Settings.php:240
static $_libXmlLoaderOptions
Definition: Settings.php:113
const PCLZIP
constants
Definition: Settings.php:42
const PDF_RENDERER_MPDF
Definition: Settings.php:51
static getChartRendererPath()
Return the directory path to the Chart Rendering Library that PHPExcel is currently configured to use...
Definition: Settings.php:270
static setPdfRendererName($libraryName)
Identify to PHPExcel the external library to use for rendering PDF files.
Definition: Settings.php:305
static $_pdfRenderers
Definition: Settings.php:58
static getPdfRendererName()
Return the PDF Rendering Library that PHPExcel is currently configured to use (e.g.
Definition: Settings.php:343
const PDF_RENDERER_TCPDF
Optional PDF Rendering libraries.
Definition: Settings.php:49
static setLibXmlLoaderOptions($options=null)
Set default options for libxml loader.
Definition: Settings.php:364
static setCacheStorageMethod( $method=PHPExcel_CachedObjectStorageFactory::cache_in_memory, $arguments=array())
Set the method that should be used for cell cacheing.
Definition: Settings.php:176
static $_pdfRendererPath
Definition: Settings.php:106
static $_zipClass
Definition: Settings.php:72
static getPdfRendererPath()
Return the directory path to the PDF Rendering Library that PHPExcel is currently configured to use.
Definition: Settings.php:354
static getZipClass()
Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive) or...
Definition: Settings.php:141
static $_pdfRendererName
Definition: Settings.php:99
static setChartRendererName($libraryName)
Identify to PHPExcel the external library to use for rendering charts.
Definition: Settings.php:222
static $_chartRendererPath
Definition: Settings.php:89
static $_chartRendererName
Definition: Settings.php:82
static setZipClass($zipClass)
Set the Zip handler Class that PHPExcel should use for Zip file management (PCLZip or ZipArchive)
Definition: Settings.php:122
static getCacheStorageClass()
Return the name of the class that is currently being used for cell cacheing.
Definition: Settings.php:163
static setChartRenderer($libraryName, $libraryBaseDir)
Set details of the external library that PHPExcel should use for rendering charts.
Definition: Settings.php:206
const PDF_RENDERER_DOMPDF
Definition: Settings.php:50
static getChartRendererName()
Return the Chart Rendering Library that PHPExcel is currently configured to use (e....
Definition: Settings.php:258
const CHART_RENDERER_JPGRAPH
Optional Chart Rendering libraries.
Definition: Settings.php:46
static setLocale($locale='en_us')
Set the locale code to use for formula translations and any special formatting.
Definition: Settings.php:191
static getLibXmlLoaderOptions()
Get default options for libxml loader.
Definition: Settings.php:381
static getCacheStorageMethod()
Return the name of the method that is currently configured for cell cacheing.
Definition: Settings.php:152
static setPdfRenderer($libraryName, $libraryBaseDir)
Set details of the external library that PHPExcel should use for rendering PDF files.
Definition: Settings.php:287
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27