From f87ca1419dff56338d8d03216bf04f0a7adcc0e7 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Thu, 6 Sep 2012 22:56:56 +0100 Subject: [PATCH] Use class_exists() with FALSE second argument --- Classes/PHPExcel/Autoloader.php | 2 +- .../CachedObjectStorage/CacheBase.php | 2 +- .../PHPExcel/CachedObjectStorage/SQLite3.php | 2 +- Classes/PHPExcel/Reader/Excel2007.php | 2 +- Classes/PHPExcel/Reader/OOCalc.php | 2 +- readme.md | 49 +++++++++++++------ 6 files changed, 40 insertions(+), 19 deletions(-) diff --git a/Classes/PHPExcel/Autoloader.php b/Classes/PHPExcel/Autoloader.php index 548994e..6b6bf6d 100644 --- a/Classes/PHPExcel/Autoloader.php +++ b/Classes/PHPExcel/Autoloader.php @@ -65,7 +65,7 @@ class PHPExcel_Autoloader * @param string $pClassName Name of the object to load */ public static function Load($pClassName){ - if ((class_exists($pClassName)) || (strpos($pClassName, 'PHPExcel') !== 0)) { + if ((class_exists($pClassName,FALSE)) || (strpos($pClassName, 'PHPExcel') !== 0)) { // Either already loaded, or not a PHPExcel class request return FALSE; } diff --git a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php index ac10d4d..822a655 100644 --- a/Classes/PHPExcel/CachedObjectStorage/CacheBase.php +++ b/Classes/PHPExcel/CachedObjectStorage/CacheBase.php @@ -33,7 +33,7 @@ * @package PHPExcel_CachedObjectStorage * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel) */ -class PHPExcel_CachedObjectStorage_CacheBase { +abstract class PHPExcel_CachedObjectStorage_CacheBase { /** * Parent worksheet diff --git a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php index 65c1c69..3c3cf74 100644 --- a/Classes/PHPExcel/CachedObjectStorage/SQLite3.php +++ b/Classes/PHPExcel/CachedObjectStorage/SQLite3.php @@ -267,7 +267,7 @@ class PHPExcel_CachedObjectStorage_SQLite3 extends PHPExcel_CachedObjectStorage_ * @return boolean */ public static function cacheMethodIsAvailable() { - if (!class_exists('SQLite3')) { + if (!class_exists('SQLite3',FALSE)) { return false; } diff --git a/Classes/PHPExcel/Reader/Excel2007.php b/Classes/PHPExcel/Reader/Excel2007.php index 98a1030..c94d1c9 100644 --- a/Classes/PHPExcel/Reader/Excel2007.php +++ b/Classes/PHPExcel/Reader/Excel2007.php @@ -236,7 +236,7 @@ class PHPExcel_Reader_Excel2007 implements PHPExcel_Reader_IReader } // Check if zip class exists - if (!class_exists('ZipArchive')) { + if (!class_exists('ZipArchive',FALSE)) { throw new Exception("ZipArchive library is not enabled"); } diff --git a/Classes/PHPExcel/Reader/OOCalc.php b/Classes/PHPExcel/Reader/OOCalc.php index b10043a..732de0c 100644 --- a/Classes/PHPExcel/Reader/OOCalc.php +++ b/Classes/PHPExcel/Reader/OOCalc.php @@ -190,7 +190,7 @@ class PHPExcel_Reader_OOCalc implements PHPExcel_Reader_IReader } // Check if zip class exists - if (!class_exists('ZipArchive')) { + if (!class_exists('ZipArchive',FALSE)) { throw new Exception("ZipArchive library is not enabled"); } diff --git a/readme.md b/readme.md index 2aedbee..baa9830 100644 --- a/readme.md +++ b/readme.md @@ -1,15 +1,36 @@ -# PHPExcel - OpenXML - Read, Write and Create Excel documents in PHP - Spreadsheet engine -PHPExcel is a Project providing a set of classes for the PHP programming language that allow you to write to and read from different spreadsheet file formats, like Excel (BIFF) .xls, Excel 2007 (OfficeOpenXML) .xlsx, CSV, Libre/OpenOffice Calc .ods, Gnumeric, PDF, HTML, ... This project is built around Microsoft's OpenXML standard and PHP. - -Checkout the features this class set provides, such as setting spreadsheet meta data (author, title, description, ...), multiple worksheets, different fonts and font styles, cell borders, fills, gradients, adding images to your spreadsheet, calculating formulas, converting between file types and much, much more! - -Want to bookmark this page? Please use [www.phpexcel.net](http://www.phpexcel.net) as the URL. - -## Want to contribute? -Fork us! - -## Donations -[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7UYH9AS6HND74) via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7UYH9AS6HND74). - -## License +# PHPExcel - OpenXML - Read, Write and Create spreadsheet documents in PHP - Spreadsheet engine +PHPExcel is a library written in pure PHP and providing a set of classes that allow you to write to and read from different spreadsheet file formats, like Excel (BIFF) .xls, Excel 2007 (OfficeOpenXML) .xlsx, CSV, Libre/OpenOffice Calc .ods, Gnumeric, PDF, HTML, ... This project is built around Microsoft's OpenXML standard and PHP. + + +## File Formats supported + +### Reading + * BIFF 5-8 (.xls) Excel 95 and above + * Office Open XML (.xlsx) Excel 2007 and above + * SpreadsheetML (.xml) Excel 2003 + * Open Document Format/OASIS (.ods) + * Gnumeric + * HTML + * SYLK + * CSV + +### Writing + * BIFF 8 (.xls) Excel 95 and above + * Office Open XML (.xlsx) Excel 2007 and above + * HTML + * CSV + * PDF (using either the tcPDF, DomPDF or mPDF libraries, which need to be installed separately) + + +## Requirements + * PHP version 5.2.0 or higher + * PHP extension php_zip enabled (required if you need PHPExcel to handle .xlsx .ods or .gnumeric files) + * PHP extension php_xml enabled + * PHP extension php_gd2 enabled (optional, but required for exact column width autocalculation) + + +## Want to contribute? +Fork us! + +## License PHPExcel is licensed under [LGPL (GNU LESSER GENERAL PUBLIC LICENSE)](https://github.com/PHPOffice/PHPExcel/blob/master/license.md) \ No newline at end of file