| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * PHPExcel | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2013-12-31 18:36:33 +00:00
										 |  |  |  * Copyright (c) 2006 - 2014 PHPExcel | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This library is free software; you can redistribute it and/or | 
					
						
							|  |  |  |  * modify it under the terms of the GNU Lesser General Public | 
					
						
							|  |  |  |  * License as published by the Free Software Foundation; either | 
					
						
							|  |  |  |  * version 2.1 of the License, or (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This library is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
					
						
							|  |  |  |  * Lesser General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Lesser General Public | 
					
						
							|  |  |  |  * License along with this library; if not, write to the Free Software | 
					
						
							|  |  |  |  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @category   PHPExcel | 
					
						
							|  |  |  |  * @package    PHPExcel | 
					
						
							| 
									
										
										
										
											2013-12-31 18:36:33 +00:00
										 |  |  |  * @copyright  Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) | 
					
						
							| 
									
										
										
										
											2012-01-19 22:36:22 +00:00
										 |  |  |  * @license    http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt    LGPL | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  |  * @version    ##VERSION##, ##DATE##
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-23 17:24:29 +00:00
										 |  |  | PHPExcel_Autoloader::Register(); | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  | //    As we always try to run the autoloader before anything else, we can use it to do a few
 | 
					
						
							|  |  |  | //        simple checks and initialisations
 | 
					
						
							| 
									
										
										
										
											2013-01-12 12:52:00 +00:00
										 |  |  | //PHPExcel_Shared_ZipStreamWrapper::register();
 | 
					
						
							| 
									
										
										
										
											2010-11-23 17:24:29 +00:00
										 |  |  | // check mbstring.func_overload
 | 
					
						
							|  |  |  | if (ini_get('mbstring.func_overload') & 2) { | 
					
						
							| 
									
										
										
										
											2013-01-15 21:42:28 +00:00
										 |  |  |     throw new PHPExcel_Exception('Multibyte function overloading in PHP must be disabled for string functions (2).'); | 
					
						
							| 
									
										
										
										
											2010-11-23 17:24:29 +00:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2010-12-03 17:48:10 +00:00
										 |  |  | PHPExcel_Shared_String::buildCharacterSets(); | 
					
						
							| 
									
										
										
										
											2010-11-23 17:24:29 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-03-21 23:55:54 +00:00
										 |  |  | /** | 
					
						
							|  |  |  |  * PHPExcel_Autoloader | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  |  * @category    PHPExcel | 
					
						
							|  |  |  |  * @package     PHPExcel | 
					
						
							| 
									
										
										
										
											2013-12-31 18:36:33 +00:00
										 |  |  |  * @copyright   Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel) | 
					
						
							| 
									
										
										
										
											2012-03-21 23:55:54 +00:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | class PHPExcel_Autoloader | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Register the Autoloader with SPL | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public static function Register() { | 
					
						
							|  |  |  |         if (function_exists('__autoload')) { | 
					
						
							|  |  |  |             //    Register any existing autoloader function with SPL, so we don't get any clashes
 | 
					
						
							|  |  |  |             spl_autoload_register('__autoload'); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |         //    Register ourselves with SPL
 | 
					
						
							|  |  |  |         return spl_autoload_register(array('PHPExcel_Autoloader', 'Load')); | 
					
						
							|  |  |  |     }   //    function Register()
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * Autoload a class identified by name | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @param    string    $pClassName        Name of the object to load | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public static function Load($pClassName){ | 
					
						
							|  |  |  |         if ((class_exists($pClassName,FALSE)) || (strpos($pClassName, 'PHPExcel') !== 0)) { | 
					
						
							|  |  |  |             //    Either already loaded, or not a PHPExcel class request
 | 
					
						
							|  |  |  |             return FALSE; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  |         $pClassFilePath = PHPEXCEL_ROOT . | 
					
						
							|  |  |  |                           str_replace('_',DIRECTORY_SEPARATOR,$pClassName) . | 
					
						
							|  |  |  |                           '.php'; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-28 21:30:58 +00:00
										 |  |  |         if ((file_exists($pClassFilePath) === FALSE) || (is_readable($pClassFilePath) === FALSE)) { | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  |             //    Can't load
 | 
					
						
							|  |  |  |             return FALSE; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  |         require($pClassFilePath); | 
					
						
							|  |  |  |     }   //    function Load()
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-25 17:56:27 +00:00
										 |  |  | } |