Avail feature updated
[ninja.git] / application / vendor / swiftmailer / classes / Swift.php
blob1518b9491c25cef686e122d8722f09f4a7e41d44
1 <?php
3 /*
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.
9 */
11 /**
12 * General utility class in Swift Mailer, not to be instantiated.
14 * @package Swift
16 * @author Chris Corbyn
18 abstract class Swift
21 /** Swift Mailer Version number generated during dist release process */
22 const VERSION = '4.0.5';
24 /**
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'))
34 return false;
37 $path = dirname(__FILE__).'/'.str_replace('_', '/', $class).'.php';
39 if (!file_exists($path))
41 return false;
44 require_once $path;
47 /**
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'));