This commit is contained in:
Dominik Bonsch 2013-02-09 12:24:19 +01:00
parent 94967a7cf9
commit b9970417c3

View File

@ -113,7 +113,8 @@ class PHPExcel_Settings
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setZipClass($zipClass) { public static function setZipClass($zipClass)
{
if (($zipClass === self::PCLZIP) || if (($zipClass === self::PCLZIP) ||
($zipClass === self::ZIPARCHIVE)) { ($zipClass === self::ZIPARCHIVE)) {
self::$_zipClass = $zipClass; self::$_zipClass = $zipClass;
@ -125,13 +126,14 @@ class PHPExcel_Settings
/** /**
* Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive) * Return the name of the Zip handler Class that PHPExcel is configured to use (PCLZip or ZipArchive)
* for Zip file management * or Zip file management
* *
* @return string Name of the Zip handler Class that PHPExcel is configured to use * @return string Name of the Zip handler Class that PHPExcel is configured to use
* for Zip file management * for Zip file management
* e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive
*/ */
public static function getZipClass() { public static function getZipClass()
{
return self::$_zipClass; return self::$_zipClass;
} // function getZipClass() } // function getZipClass()
@ -141,7 +143,8 @@ class PHPExcel_Settings
* *
* @return string Name of the cacheing method * @return string Name of the cacheing method
*/ */
public static function getCacheStorageMethod() { public static function getCacheStorageMethod()
{
return PHPExcel_CachedObjectStorageFactory::getCacheStorageMethod(); return PHPExcel_CachedObjectStorageFactory::getCacheStorageMethod();
} // function getCacheStorageMethod() } // function getCacheStorageMethod()
@ -151,7 +154,8 @@ class PHPExcel_Settings
* *
* @return string Name of the class currently being used for cacheing * @return string Name of the class currently being used for cacheing
*/ */
public static function getCacheStorageClass() { public static function getCacheStorageClass()
{
return PHPExcel_CachedObjectStorageFactory::getCacheStorageClass(); return PHPExcel_CachedObjectStorageFactory::getCacheStorageClass();
} // function getCacheStorageClass() } // function getCacheStorageClass()
@ -163,8 +167,11 @@ class PHPExcel_Settings
* @param array $arguments Optional configuration arguments for the cacheing method * @param array $arguments Optional configuration arguments for the cacheing method
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setCacheStorageMethod($method = PHPExcel_CachedObjectStorageFactory::cache_in_memory, public static function setCacheStorageMethod(
$arguments = array()) { $method = PHPExcel_CachedObjectStorageFactory::cache_in_memory,
$arguments = array()
)
{
return PHPExcel_CachedObjectStorageFactory::initialize($method, $arguments); return PHPExcel_CachedObjectStorageFactory::initialize($method, $arguments);
} // function setCacheStorageMethod() } // function setCacheStorageMethod()
@ -175,7 +182,8 @@ class PHPExcel_Settings
* @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk") * @param string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk")
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setLocale($locale='en_us') { public static function setLocale($locale='en_us')
{
return PHPExcel_Calculation::getInstance()->setLocale($locale); return PHPExcel_Calculation::getInstance()->setLocale($locale);
} // function setLocale() } // function setLocale()
@ -186,9 +194,11 @@ class PHPExcel_Settings
* @param string $libraryName Internal reference name of the library * @param string $libraryName Internal reference name of the library
* e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH * e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH
* @param string $libraryBaseDir Directory path to the library's base folder * @param string $libraryBaseDir Directory path to the library's base folder
*
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setChartRenderer($libraryName, $libraryBaseDir) { public static function setChartRenderer($libraryName, $libraryBaseDir)
{
if (!self::setChartRendererName($libraryName)) if (!self::setChartRendererName($libraryName))
return FALSE; return FALSE;
return self::setChartRendererPath($libraryBaseDir); return self::setChartRendererPath($libraryBaseDir);
@ -200,9 +210,11 @@ class PHPExcel_Settings
* *
* @param string $libraryName Internal reference name of the library * @param string $libraryName Internal reference name of the library
* e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH * e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH
*
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setChartRendererName($libraryName) { public static function setChartRendererName($libraryName)
{
if (!in_array($libraryName,self::$_chartRenderers)) { if (!in_array($libraryName,self::$_chartRenderers)) {
return FALSE; return FALSE;
} }
@ -219,7 +231,8 @@ class PHPExcel_Settings
* @param string $libraryBaseDir Directory path to the library's base folder * @param string $libraryBaseDir Directory path to the library's base folder
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setChartRendererPath($libraryBaseDir) { public static function setChartRendererPath($libraryBaseDir)
{
if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) { if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) {
return FALSE; return FALSE;
} }
@ -236,7 +249,8 @@ class PHPExcel_Settings
* currently configured to use * currently configured to use
* e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH * e.g. PHPExcel_Settings::CHART_RENDERER_JPGRAPH
*/ */
public static function getChartRendererName() { public static function getChartRendererName()
{
return self::$_chartRendererName; return self::$_chartRendererName;
} // function getChartRendererName() } // function getChartRendererName()
@ -247,7 +261,8 @@ class PHPExcel_Settings
* @return string|NULL Directory Path to the Chart Rendering Library that PHPExcel is * @return string|NULL Directory Path to the Chart Rendering Library that PHPExcel is
* currently configured to use * currently configured to use
*/ */
public static function getChartRendererPath() { public static function getChartRendererPath()
{
return self::$_chartRendererPath; return self::$_chartRendererPath;
} // function getChartRendererPath() } // function getChartRendererPath()
@ -260,9 +275,11 @@ class PHPExcel_Settings
* PHPExcel_Settings::PDF_RENDERER_DOMPDF * PHPExcel_Settings::PDF_RENDERER_DOMPDF
* or PHPExcel_Settings::PDF_RENDERER_MPDF * or PHPExcel_Settings::PDF_RENDERER_MPDF
* @param string $libraryBaseDir Directory path to the library's base folder * @param string $libraryBaseDir Directory path to the library's base folder
*
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setPdfRenderer($libraryName, $libraryBaseDir) { public static function setPdfRenderer($libraryName, $libraryBaseDir)
{
if (!self::setPdfRendererName($libraryName)) if (!self::setPdfRendererName($libraryName))
return FALSE; return FALSE;
return self::setPdfRendererPath($libraryBaseDir); return self::setPdfRendererPath($libraryBaseDir);
@ -276,9 +293,11 @@ class PHPExcel_Settings
* e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF, * e.g. PHPExcel_Settings::PDF_RENDERER_TCPDF,
* PHPExcel_Settings::PDF_RENDERER_DOMPDF * PHPExcel_Settings::PDF_RENDERER_DOMPDF
* or PHPExcel_Settings::PDF_RENDERER_MPDF * or PHPExcel_Settings::PDF_RENDERER_MPDF
*
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setPdfRendererName($libraryName) { public static function setPdfRendererName($libraryName)
{
if (!in_array($libraryName,self::$_pdfRenderers)) { if (!in_array($libraryName,self::$_pdfRenderers)) {
return FALSE; return FALSE;
} }
@ -295,7 +314,8 @@ class PHPExcel_Settings
* @param string $libraryBaseDir Directory path to the library's base folder * @param string $libraryBaseDir Directory path to the library's base folder
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setPdfRendererPath($libraryBaseDir) { public static function setPdfRendererPath($libraryBaseDir)
{
if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) { if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) {
return FALSE; return FALSE;
} }
@ -314,7 +334,8 @@ class PHPExcel_Settings
* PHPExcel_Settings::PDF_RENDERER_DOMPDF * PHPExcel_Settings::PDF_RENDERER_DOMPDF
* or PHPExcel_Settings::PDF_RENDERER_MPDF * or PHPExcel_Settings::PDF_RENDERER_MPDF
*/ */
public static function getPdfRendererName() { public static function getPdfRendererName()
{
return self::$_pdfRendererName; return self::$_pdfRendererName;
} // function getPdfRendererName() } // function getPdfRendererName()
@ -325,7 +346,8 @@ class PHPExcel_Settings
* @return string|NULL Directory Path to the PDF Rendering Library that PHPExcel is * @return string|NULL Directory Path to the PDF Rendering Library that PHPExcel is
* currently configured to use * currently configured to use
*/ */
public static function getPdfRendererPath() { public static function getPdfRendererPath()
{
return self::$_pdfRendererPath; return self::$_pdfRendererPath;
} // function getPdfRendererPath() } // function getPdfRendererPath()