autoload.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. define('LARAVEL_START', microtime(true));
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Register The Composer Auto Loader
  6. |--------------------------------------------------------------------------
  7. |
  8. | Composer provides a convenient, automatically generated class loader
  9. | for our application. We just need to utilize it! We'll require it
  10. | into the script here so that we do not have to worry about the
  11. | loading of any our classes "manually". Feels great to relax.
  12. |
  13. */
  14. require __DIR__.'/../vendor/autoload.php';
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Include The Compiled Class File
  18. |--------------------------------------------------------------------------
  19. |
  20. | To dramatically increase your application's performance, you may use a
  21. | compiled class file which contains all of the classes commonly used
  22. | by a request. The Artisan "optimize" is used to create this file.
  23. |
  24. */
  25. if (file_exists($compiled = __DIR__.'/compiled.php'))
  26. {
  27. require $compiled;
  28. }
  29. /*
  30. |--------------------------------------------------------------------------
  31. | Setup Patchwork UTF-8 Handling
  32. |--------------------------------------------------------------------------
  33. |
  34. | The Patchwork library provides solid handling of UTF-8 strings as well
  35. | as provides replacements for all mb_* and iconv type functions that
  36. | are not available by default in PHP. We'll setup this stuff here.
  37. |
  38. */
  39. Patchwork\Utf8\Bootup::initMbstring();
  40. /*
  41. |--------------------------------------------------------------------------
  42. | Register The Laravel Auto Loader
  43. |--------------------------------------------------------------------------
  44. |
  45. | We register an auto-loader "behind" the Composer loader that can load
  46. | model classes on the fly, even if the autoload files have not been
  47. | regenerated for the application. We'll add it to the stack here.
  48. |
  49. */
  50. Illuminate\Support\ClassLoader::register();
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Register The Workbench Loaders
  54. |--------------------------------------------------------------------------
  55. |
  56. | The Laravel workbench provides a convenient place to develop packages
  57. | when working locally. However we will need to load in the Composer
  58. | auto-load files for the packages so that these can be used here.
  59. |
  60. */
  61. if (is_dir($workbench = __DIR__.'/../workbench'))
  62. {
  63. Illuminate\Workbench\Starter::start($workbench);
  64. }