paths.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. /**
  3. * Laravel - A PHP Framework For Web Artisans
  4. *
  5. * @package Laravel
  6. * @version 3.2.14
  7. * @author Taylor Otwell <taylorotwell@gmail.com>
  8. * @link http://laravel.com
  9. */
  10. /*
  11. |----------------------------------------------------------------
  12. | Application Environments
  13. |----------------------------------------------------------------
  14. |
  15. | Laravel takes a dead simple approach to environments, and we
  16. | think you'll love it. Just specify which URLs belong to a
  17. | given environment, and when you access your application
  18. | from a URL matching that pattern, we'll be sure to
  19. | merge in that environment's configuration files.
  20. |
  21. */
  22. $environments = array(
  23. 'local' => array('http://localhost*', '*.dev'),
  24. );
  25. // --------------------------------------------------------------
  26. // The path to the application directory.
  27. // --------------------------------------------------------------
  28. $paths['app'] = 'application';
  29. // --------------------------------------------------------------
  30. // The path to the Laravel directory.
  31. // --------------------------------------------------------------
  32. $paths['sys'] = 'laravel';
  33. // --------------------------------------------------------------
  34. // The path to the bundles directory.
  35. // --------------------------------------------------------------
  36. $paths['bundle'] = 'bundles';
  37. // --------------------------------------------------------------
  38. // The path to the storage directory.
  39. // --------------------------------------------------------------
  40. $paths['storage'] = 'storage';
  41. // --------------------------------------------------------------
  42. // The path to the public directory.
  43. // --------------------------------------------------------------
  44. $paths['public'] = 'public';
  45. // *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
  46. // END OF USER CONFIGURATION. HERE BE DRAGONS!
  47. // *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
  48. /*
  49. .~))>>
  50. .~)>>
  51. .~))))>>>
  52. .~))>> ___
  53. .~))>>)))>> .-~))>>
  54. .~)))))>> .-~))>>)>
  55. .~)))>>))))>> .-~)>>)>
  56. ) .~))>>))))>> .-~)))))>>)>
  57. ( )@@*) //)>)))))) .-~))))>>)>
  58. ).@(@@ //))>>))) .-~))>>)))))>>)>
  59. (( @.@). //))))) .-~)>>)))))>>)>
  60. )) )@@*.@@ ) //)>))) //))))))>>))))>>)>
  61. (( ((@@@.@@ |/))))) //)))))>>)))>>)>
  62. )) @@*. )@@ ) (\_(\-\b |))>)) //)))>>)))))))>>)>
  63. (( @@@(.@(@ . _/`-` ~|b |>))) //)>>)))))))>>)>
  64. )* @@@ )@* (@) (@) /\b|))) //))))))>>))))>>
  65. (( @. )@( @ . _/ / / \b)) //))>>)))))>>>_._
  66. )@@ (@@*)@@. (6///6)- / ^ \b)//))))))>>)))>> ~~-.
  67. ( @jgs@@. @@@.*@_ VvvvvV// ^ \b/)>>))))>> _. `bb
  68. ((@@ @@@*.(@@ . - | o |' \ ( ^ \b)))>> .' b`,
  69. ((@@).*@@ )@ ) \^^^/ (( ^ ~)_ \ / b `,
  70. (@@. (@@ ). `-' ((( ^ `\ \ \ \ \| b `.
  71. (*.@* / (((( \| | | \ . b `.
  72. / / ((((( \ \ / _.-~\ Y, b ;
  73. / / / (((((( \ \.-~ _.`" _.-~`, b ;
  74. / / `(((((() ) (((((~ `, b ;
  75. _/ _/ `"""/ /' ; b ;
  76. _.-~_.-~ / /' _.'~bb _.'
  77. ((((~~ / /' _.'~bb.--~
  78. (((( __.-~bb.-~
  79. .' b .~~
  80. :bb ,'
  81. ~~~~
  82. */
  83. // --------------------------------------------------------------
  84. // Change to the current working directory.
  85. // --------------------------------------------------------------
  86. chdir(__DIR__);
  87. // --------------------------------------------------------------
  88. // Define the directory separator for the environment.
  89. // --------------------------------------------------------------
  90. if ( ! defined('DS'))
  91. {
  92. define('DS', DIRECTORY_SEPARATOR);
  93. }
  94. // --------------------------------------------------------------
  95. // Define the path to the base directory.
  96. // --------------------------------------------------------------
  97. $GLOBALS['laravel_paths']['base'] = __DIR__.DS;
  98. // --------------------------------------------------------------
  99. // Define each constant if it hasn't been defined.
  100. // --------------------------------------------------------------
  101. foreach ($paths as $name => $path)
  102. {
  103. if ( ! isset($GLOBALS['laravel_paths'][$name]))
  104. {
  105. $GLOBALS['laravel_paths'][$name] = realpath($path).DS;
  106. }
  107. }
  108. /**
  109. * A global path helper function.
  110. *
  111. * <code>
  112. * $storage = path('storage');
  113. * </code>
  114. *
  115. * @param string $path
  116. * @return string
  117. */
  118. function path($path)
  119. {
  120. return $GLOBALS['laravel_paths'][$path];
  121. }
  122. /**
  123. * A global path setter function.
  124. *
  125. * @param string $path
  126. * @param string $value
  127. * @return void
  128. */
  129. function set_path($path, $value)
  130. {
  131. $GLOBALS['laravel_paths'][$path] = $value;
  132. }