1: <?php
2:
3: /*
4: * This file is part of SwiftMailer.
5: * (c) 2004-2009 Chris Corbyn
6: *
7: * For the full copyright and license information, please view the LICENSE
8: * file that was distributed with this source code.
9: */
10:
11: /*
12: * Autoloader and dependency injection initialization for Swift Mailer.
13: */
14:
15: if (defined('SWIFT_REQUIRED_LOADED')) {
16: return;
17: }
18:
19: define('SWIFT_REQUIRED_LOADED', true);
20:
21: //Load Swift utility class
22: require dirname(__FILE__) . '/classes/Swift.php';
23:
24: if (!function_exists('_swiftmailer_init')) {
25: function _swiftmailer_init()
26: {
27: require dirname(__FILE__) . '/swift_init.php';
28: }
29: }
30:
31: //Start the autoloader and lazy-load the init script to set up dependency injection
32: Swift::registerAutoload('_swiftmailer_init');
33: