ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Autoloader.php
Go to the documentation of this file.
1 <?php
29 // As we always try to run the autoloader before anything else, we can use it to do a few
30 // simple checks and initialisations
31 //PHPExcel_Shared_ZipStreamWrapper::register();
32 // check mbstring.func_overload
33 if (ini_get('mbstring.func_overload') & 2) {
34  throw new PHPExcel_Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
35 }
37 
38 
47 {
52  public static function Register() {
53  if (function_exists('__autoload')) {
54  // Register any existing autoloader function with SPL, so we don't get any clashes
55  spl_autoload_register('__autoload');
56  }
57  // Register ourselves with SPL
58  if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
59  return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'), true, true);
60  } else {
61  return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'));
62  }
63  } // function Register()
64 
65 
71  public static function Load($pClassName){
72  if ((class_exists($pClassName,FALSE)) || (strpos($pClassName, 'PHPExcel') !== 0)) {
73  // Either already loaded, or not a PHPExcel class request
74  return FALSE;
75  }
76 
77  $pClassFilePath = PHPEXCEL_ROOT .
78  str_replace('_',DIRECTORY_SEPARATOR,$pClassName) .
79  '.php';
80 
81  if ((file_exists($pClassFilePath) === FALSE) || (is_readable($pClassFilePath) === FALSE)) {
82  // Can't load
83  return FALSE;
84  }
85 
86  require($pClassFilePath);
87  } // function Load()
88 
89 }
static Register()
Register the Autoloader with SPL.
Definition: Autoloader.php:52
static buildCharacterSets()
Definition: String.php:332
static Load($pClassName)
Autoload a class identified by name.
Definition: Autoloader.php:71
Create styles array
The data for the language used.