You are here

public static function PHPExcel_Autoloader::Load in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Autoloader.php \PHPExcel_Autoloader::Load()

Autoload a class identified by name

Parameters

string $pClassName Name of the object to load:

3 calls to PHPExcel_Autoloader::Load()
AutoloaderTest::testAutoloaderInvalidPHPExcelClass in vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/AutoloaderTest.php
AutoloaderTest::testAutoloaderNonPHPExcelClass in vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/AutoloaderTest.php
AutoloaderTest::testAutoloadValidPHPExcelClass in vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/AutoloaderTest.php

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Autoloader.php, line 71

Class

PHPExcel_Autoloader
PHPExcel_Autoloader

Code

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;
  }
  $pClassFilePath = PHPEXCEL_ROOT . str_replace('_', DIRECTORY_SEPARATOR, $pClassName) . '.php';
  if (file_exists($pClassFilePath) === FALSE || is_readable($pClassFilePath) === FALSE) {

    //    Can't load
    return FALSE;
  }
  require $pClassFilePath;
}