Application.php 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. namespace Illuminate\Contracts\Foundation;
  3. use Illuminate\Contracts\Container\Container;
  4. interface Application extends Container
  5. {
  6. /**
  7. * Get the version number of the application.
  8. *
  9. * @return string
  10. */
  11. public function version();
  12. /**
  13. * Get the base path of the Laravel installation.
  14. *
  15. * @return string
  16. */
  17. public function basePath();
  18. /**
  19. * Get or check the current application environment.
  20. *
  21. * @return string
  22. */
  23. public function environment();
  24. /**
  25. * Determine if the application is running in the console.
  26. *
  27. * @return bool
  28. */
  29. public function runningInConsole();
  30. /**
  31. * Determine if the application is running unit tests.
  32. *
  33. * @return bool
  34. */
  35. public function runningUnitTests();
  36. /**
  37. * Determine if the application is currently down for maintenance.
  38. *
  39. * @return bool
  40. */
  41. public function isDownForMaintenance();
  42. /**
  43. * Register all of the configured providers.
  44. *
  45. * @return void
  46. */
  47. public function registerConfiguredProviders();
  48. /**
  49. * Register a service provider with the application.
  50. *
  51. * @param \Illuminate\Support\ServiceProvider|string $provider
  52. * @param array $options
  53. * @param bool $force
  54. * @return \Illuminate\Support\ServiceProvider
  55. */
  56. public function register($provider, $options = [], $force = false);
  57. /**
  58. * Register a deferred provider and service.
  59. *
  60. * @param string $provider
  61. * @param string|null $service
  62. * @return void
  63. */
  64. public function registerDeferredProvider($provider, $service = null);
  65. /**
  66. * Boot the application's service providers.
  67. *
  68. * @return void
  69. */
  70. public function boot();
  71. /**
  72. * Register a new boot listener.
  73. *
  74. * @param mixed $callback
  75. * @return void
  76. */
  77. public function booting($callback);
  78. /**
  79. * Register a new "booted" listener.
  80. *
  81. * @param mixed $callback
  82. * @return void
  83. */
  84. public function booted($callback);
  85. /**
  86. * Get the path to the cached services.php file.
  87. *
  88. * @return string
  89. */
  90. public function getCachedServicesPath();
  91. /**
  92. * Get the path to the cached packages.php file.
  93. *
  94. * @return string
  95. */
  96. public function getCachedPackagesPath();
  97. }