ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPMailerAutoload.php File Reference

Go to the source code of this file.

Namespaces

 PHPMailer
 PHPMailer - PHP email creation and transport class.
 

Functions

 PHPMailerAutoload ($classname)
 PHPMailer SPL autoloader. More...
 

Function Documentation

◆ PHPMailerAutoload()

PHPMailerAutoload (   $classname)

PHPMailer SPL autoloader.

Parameters
string$classnameThe name of the class to load

Definition at line 24 of file PHPMailerAutoload.php.

References $filename.

25 {
26  //Can't use __DIR__ as it's only in PHP 5.3+
27  $filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
28  if (is_readable($filename)) {
29  require $filename;
30  }
31 }
32 
33 if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
34  //SPL autoloading was introduced in PHP 5.1.2
35  if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
36  spl_autoload_register('PHPMailerAutoload', true, true);
37  } else {
38  spl_autoload_register('PHPMailerAutoload');
39  }
40 } else {