Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Foundation\Application;
  4. use Illuminate\Support\ServiceProvider;
  5.  
  6. class GoogleAppEngineApplication extends Application
  7. {
  8. public function bindInstallPaths(array $paths)
  9. {
  10. if (realpath($paths['app'])) {
  11. $this->instance('path', realpath($paths['app']));
  12. }
  13. elseif (file_exists($paths['app'])) {
  14. $this->instance('path', $paths['app']);
  15. }
  16. else {
  17. $this->instance('path', FALSE);
  18. }
  19.  
  20. foreach (array_except($paths, array('app')) as $key => $value)
  21. {
  22. if (realpath($value)) {
  23. $this->instance("path.{$key}", realpath($value));
  24. }
  25. elseif (file_exists($value)) {
  26. $this->instance("path.{$key}", $value);
  27. }
  28. else {
  29. $this->instance("path.{$key}", FALSE);
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement