bundle.php 1.4 KB

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