swift_required_pear.php 735B

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