| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * PHPExcel | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2011-01-03 09:20:10 +00:00
										 |  |  |  * Copyright (c) 2006 - 2011 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 | 
					
						
							| 
									
										
										
										
											2011-01-03 09:20:10 +00:00
										 |  |  |  * @copyright  Copyright (c) 2006 - 2011 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(); | 
					
						
							|  |  |  | PHPExcel_Shared_ZipStreamWrapper::register(); | 
					
						
							|  |  |  | // check mbstring.func_overload
 | 
					
						
							|  |  |  | if (ini_get('mbstring.func_overload') & 2) { | 
					
						
							| 
									
										
										
										
											2012-01-19 22:36:22 +00:00
										 |  |  |     throw new 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
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | class PHPExcel_Autoloader | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2012-01-19 22:36:22 +00:00
										 |  |  |     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-01-19 22:36:22 +00:00
										 |  |  |     public static function Load($pObjectName){ | 
					
						
							|  |  |  |         if ((class_exists($pObjectName)) || (strpos($pObjectName, 'PHPExcel') !== 0)) { | 
					
						
							|  |  |  |             //    Either already loaded, or not a PHPExcel class request
 | 
					
						
							|  |  |  |             return FALSE; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-19 22:36:22 +00:00
										 |  |  |         $pObjectFilePath = PHPEXCEL_ROOT . | 
					
						
							|  |  |  |                            str_replace('_',DIRECTORY_SEPARATOR,$pObjectName) . | 
					
						
							|  |  |  |                            '.php'; | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-19 22:36:22 +00:00
										 |  |  |         if ((file_exists($pObjectFilePath) === false) || (is_readable($pObjectFilePath) === false)) { | 
					
						
							|  |  |  |             //    Can't load
 | 
					
						
							|  |  |  |             return FALSE; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-19 22:36:22 +00:00
										 |  |  |         require($pObjectFilePath); | 
					
						
							|  |  |  |     }    //    function Load()
 | 
					
						
							| 
									
										
										
										
											2010-08-26 19:14:53 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | } |