autoload.php 789 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. use Doctrine\Common\Annotations\AnnotationRegistry;
  3. if (!$loader = @include __DIR__.'/../vendor/autoload.php') {
  4. $message = <<< EOF
  5. <p>You must set up the project dependencies by running the following commands:</p>
  6. <pre>
  7. curl -s http://getcomposer.org/installer | php
  8. php composer.phar install
  9. </pre>
  10. EOF;
  11. if (PHP_SAPI === 'cli') {
  12. $message = strip_tags($message);
  13. }
  14. die($message);
  15. }
  16. // intl
  17. if (!function_exists('intl_get_error_code')) {
  18. require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php';
  19. $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs');
  20. }
  21. AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
  22. return $loader;