ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Autoloader Class Reference
+ Collaboration diagram for PHPExcel_Autoloader:

Static Public Member Functions

static Register ()
 Register the Autoloader with SPL. More...
 
static Load ($pClassName)
 Autoload a class identified by name. More...
 

Detailed Description

Definition at line 46 of file Autoloader.php.

Member Function Documentation

◆ Load()

static PHPExcel_Autoloader::Load (   $pClassName)
static

Autoload a class identified by name.

Parameters
string$pClassNameName of the object to load

Definition at line 71 of file Autoloader.php.

Referenced by AutoloaderTest\testAutoloaderInvalidPHPExcelClass(), AutoloaderTest\testAutoloaderNonPHPExcelClass(), and AutoloaderTest\testAutoloadValidPHPExcelClass().

71  {
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()
+ Here is the caller graph for this function:

◆ Register()

static PHPExcel_Autoloader::Register ( )
static

Register the Autoloader with SPL.

Definition at line 52 of file Autoloader.php.

References array.

52  {
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()
Create styles array
The data for the language used.

The documentation for this class was generated from the following file: