浏览代码

re-add swiftmailer autoloading code

Igor Wiedler 13 年之前
父节点
当前提交
3eaea40752
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      app/autoload.php

+ 5 - 0
app/autoload.php

@@ -39,3 +39,8 @@ AnnotationRegistry::registerLoader(function($class) use ($loader) {
     return class_exists($class, false);
 });
 AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php');
+
+// Swiftmailer needs a special autoloader to allow
+// the lazy loading of the init file (which is expensive)
+require_once __DIR__.'/../vendor/swiftmailer/lib/classes/Swift.php';
+Swift::registerAutoload(__DIR__.'/../vendor/swiftmailer/lib/swift_init.php');