123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- <?php
- namespace Illuminate\Contracts\Foundation;
- use Closure;
- use Illuminate\Contracts\Container\Container;
- interface Application extends Container
- {
- /**
- * Get the version number of the application.
- *
- * @return string
- */
- public function version();
- /**
- * Get the base path of the Laravel installation.
- *
- * @return string
- */
- public function basePath();
- /**
- * Get the path to the bootstrap directory.
- *
- * @param string $path Optionally, a path to append to the bootstrap path
- * @return string
- */
- public function bootstrapPath($path = '');
- /**
- * Get the path to the application configuration files.
- *
- * @param string $path Optionally, a path to append to the config path
- * @return string
- */
- public function configPath($path = '');
- /**
- * Get the path to the database directory.
- *
- * @param string $path Optionally, a path to append to the database path
- * @return string
- */
- public function databasePath($path = '');
- /**
- * Get the path to the environment file directory.
- *
- * @return string
- */
- public function environmentPath();
- /**
- * Get the path to the resources directory.
- *
- * @param string $path
- * @return string
- */
- public function resourcePath($path = '');
- /**
- * Get the path to the storage directory.
- *
- * @return string
- */
- public function storagePath();
- /**
- * Get or check the current application environment.
- *
- * @param string|array $environments
- * @return string|bool
- */
- public function environment(...$environments);
- /**
- * Determine if the application is running in the console.
- *
- * @return bool
- */
- public function runningInConsole();
- /**
- * Determine if the application is running unit tests.
- *
- * @return bool
- */
- public function runningUnitTests();
- /**
- * Determine if the application is currently down for maintenance.
- *
- * @return bool
- */
- public function isDownForMaintenance();
- /**
- * Register all of the configured providers.
- *
- * @return void
- */
- public function registerConfiguredProviders();
- /**
- * Register a service provider with the application.
- *
- * @param \Illuminate\Support\ServiceProvider|string $provider
- * @param bool $force
- * @return \Illuminate\Support\ServiceProvider
- */
- public function register($provider, $force = false);
- /**
- * Register a deferred provider and service.
- *
- * @param string $provider
- * @param string|null $service
- * @return void
- */
- public function registerDeferredProvider($provider, $service = null);
- /**
- * Resolve a service provider instance from the class name.
- *
- * @param string $provider
- * @return \Illuminate\Support\ServiceProvider
- */
- public function resolveProvider($provider);
- /**
- * Boot the application's service providers.
- *
- * @return void
- */
- public function boot();
- /**
- * Register a new boot listener.
- *
- * @param callable $callback
- * @return void
- */
- public function booting($callback);
- /**
- * Register a new "booted" listener.
- *
- * @param callable $callback
- * @return void
- */
- public function booted($callback);
- /**
- * Run the given array of bootstrap classes.
- *
- * @param array $bootstrappers
- * @return void
- */
- public function bootstrapWith(array $bootstrappers);
- /**
- * Determine if the application configuration is cached.
- *
- * @return bool
- */
- public function configurationIsCached();
- /**
- * Detect the application's current environment.
- *
- * @param \Closure $callback
- * @return string
- */
- public function detectEnvironment(Closure $callback);
- /**
- * Get the environment file the application is using.
- *
- * @return string
- */
- public function environmentFile();
- /**
- * Get the fully qualified path to the environment file.
- *
- * @return string
- */
- public function environmentFilePath();
- /**
- * Get the path to the configuration cache file.
- *
- * @return string
- */
- public function getCachedConfigPath();
- /**
- * Get the path to the cached services.php file.
- *
- * @return string
- */
- public function getCachedServicesPath();
- /**
- * Get the path to the cached packages.php file.
- *
- * @return string
- */
- public function getCachedPackagesPath();
- /**
- * Get the path to the routes cache file.
- *
- * @return string
- */
- public function getCachedRoutesPath();
- /**
- * Get the current application locale.
- *
- * @return string
- */
- public function getLocale();
- /**
- * Get the application namespace.
- *
- * @return string
- *
- * @throws \RuntimeException
- */
- public function getNamespace();
- /**
- * Get the registered service provider instances if any exist.
- *
- * @param \Illuminate\Support\ServiceProvider|string $provider
- * @return array
- */
- public function getProviders($provider);
- /**
- * Determine if the application has been bootstrapped before.
- *
- * @return bool
- */
- public function hasBeenBootstrapped();
- /**
- * Load and boot all of the remaining deferred providers.
- *
- * @return void
- */
- public function loadDeferredProviders();
- /**
- * Set the environment file to be loaded during bootstrapping.
- *
- * @param string $file
- * @return $this
- */
- public function loadEnvironmentFrom($file);
- /**
- * Determine if the application routes are cached.
- *
- * @return bool
- */
- public function routesAreCached();
- /**
- * Set the current application locale.
- *
- * @param string $locale
- * @return void
- */
- public function setLocale($locale);
- /**
- * Determine if middleware has been disabled for the application.
- *
- * @return bool
- */
- public function shouldSkipMiddleware();
- /**
- * Terminate the application.
- *
- * @return void
- */
- public function terminate();
- }
|