4 * This file is part of SwiftMailer.
5 * (c) 2004-2009 Chris Corbyn
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
12 * General utility class in Swift Mailer, not to be instantiated.
16 * @author Chris Corbyn
21 /** Swift Mailer Version number generated during dist release process */
22 const VERSION
= '4.0.5';
25 * Internal autoloader for spl_autoload_register().
27 * @param string $class
29 public static function autoload($class)
31 //Don't interfere with other autoloaders
32 if (0 !== strpos($class, 'Swift'))
37 $path = dirname(__FILE__
).'/'.str_replace('_', '/', $class).'.php';
39 if (!file_exists($path))
48 * Configure autoloading using Swift Mailer.
50 * This is designed to play nicely with other autoloaders.
52 public static function registerAutoload()
54 spl_autoload_register(array('Swift', 'autoload'));