paths.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Laravel - A PHP Framework For Web Artisans
  4. *
  5. * @package Laravel
  6. * @version 2.2.0 (Beta 1)
  7. * @author Taylor Otwell <taylorotwell@gmail.com>
  8. * @link http://laravel.com
  9. */
  10. // --------------------------------------------------------------
  11. // Initialize the web variable if it doesn't exist.
  12. // --------------------------------------------------------------
  13. if ( ! isset($web)) $web = false;
  14. // --------------------------------------------------------------
  15. // Define the directory separator for the environment.
  16. // --------------------------------------------------------------
  17. define('DS', DIRECTORY_SEPARATOR);
  18. // --------------------------------------------------------------
  19. // The path to the application directory.
  20. // --------------------------------------------------------------
  21. $paths['APP_PATH'] = 'application';
  22. // --------------------------------------------------------------
  23. // The path to the Laravel directory.
  24. // --------------------------------------------------------------
  25. $paths['SYS_PATH'] = 'laravel';
  26. // --------------------------------------------------------------
  27. // The path to the bundles directory.
  28. // --------------------------------------------------------------
  29. $paths['BUNDLE_PATH'] = 'bundles';
  30. // --------------------------------------------------------------
  31. // The path to the storage directory.
  32. // --------------------------------------------------------------
  33. $paths['STORAGE_PATH'] = 'storage';
  34. // --------------------------------------------------------------
  35. // The path to the tests directory.
  36. // --------------------------------------------------------------
  37. $paths['TESTS_PATH'] = 'tests';
  38. // --------------------------------------------------------------
  39. // The path to the public directory.
  40. // --------------------------------------------------------------
  41. if ($web)
  42. {
  43. define('PUBLIC_PATH', realpath('').DS);
  44. }
  45. else
  46. {
  47. $paths['PUBLIC_PATH'] = 'public';
  48. }
  49. // --------------------------------------------------------------
  50. // Define each constant if it hasn't been defined.
  51. // --------------------------------------------------------------
  52. foreach ($paths as $name => $path)
  53. {
  54. if ( ! defined($name))
  55. {
  56. $path = ($web) ? '../'.$path : $path;
  57. define($name, realpath($path).DS);
  58. }
  59. }