start.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Auto-Loader Mappings
  5. |--------------------------------------------------------------------------
  6. |
  7. | Laravel uses a simple array of class to path mappings to drive the class
  8. | auto-loader. This simple approach helps avoid the performance problems
  9. | of searching through directories by convention.
  10. |
  11. | Registering a mapping couldn't be easier. Just pass an array of class
  12. | to path maps into the "map" function of Autoloader. Then, when you
  13. | want to use that class, just use it. It's simple!
  14. |
  15. */
  16. Autoloader::map(array(
  17. 'Base_Controller' => path('app').'controllers/base.php',
  18. ));
  19. /*
  20. |--------------------------------------------------------------------------
  21. | Auto-Loader Directories
  22. |--------------------------------------------------------------------------
  23. |
  24. | The Laravel auto-loader can search directories for files using the PSR-0
  25. | naming convention. This convention basically organizes classes by using
  26. | the class namespace to indicate the directory structure.
  27. |
  28. | So you don't have to manually map all of your models, we've added the
  29. | models and libraries directories for you. So, you can model away and
  30. | the auto-loader will take care of the rest.
  31. |
  32. */
  33. Autoloader::directories(array(
  34. path('app').'models',
  35. path('app').'libraries',
  36. ));