ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
PHPMailerAutoload.php
Go to the documentation of this file.
1<?php
24function 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
33if (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.
$filename
Definition: buildRTE.php:89