ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPMailerAutoload.php
Go to the documentation of this file.
1 <?php
24 function PHPMailerAutoload($classname)
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 {
45  function __autoload($classname)
46  {
47  PHPMailerAutoload($classname);
48  }
49 }
PHPMailerAutoload($classname)
PHPMailer SPL autoloader.