package and depencies
This commit is contained in:
56
vendor/symfony/http-kernel/KernelInterface.php
vendored
56
vendor/symfony/http-kernel/KernelInterface.php
vendored
@@ -20,10 +20,6 @@ use Symfony\Component\HttpKernel\Bundle\BundleInterface;
|
||||
*
|
||||
* It manages an environment made of application kernel and bundles.
|
||||
*
|
||||
* @method string getBuildDir() Returns the build directory - not implementing it is deprecated since Symfony 5.2.
|
||||
* This directory should be used to store build artifacts, and can be read-only at runtime.
|
||||
* Caches written at runtime should be stored in the "cache directory" ({@see KernelInterface::getCacheDir()}).
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*/
|
||||
interface KernelInterface extends HttpKernelInterface
|
||||
@@ -33,7 +29,7 @@ interface KernelInterface extends HttpKernelInterface
|
||||
*
|
||||
* @return iterable<mixed, BundleInterface>
|
||||
*/
|
||||
public function registerBundles();
|
||||
public function registerBundles(): iterable;
|
||||
|
||||
/**
|
||||
* Loads the container configuration.
|
||||
@@ -57,16 +53,14 @@ interface KernelInterface extends HttpKernelInterface
|
||||
*
|
||||
* @return array<string, BundleInterface>
|
||||
*/
|
||||
public function getBundles();
|
||||
public function getBundles(): array;
|
||||
|
||||
/**
|
||||
* Returns a bundle.
|
||||
*
|
||||
* @return BundleInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException when the bundle is not enabled
|
||||
*/
|
||||
public function getBundle(string $name);
|
||||
public function getBundle(string $name): BundleInterface;
|
||||
|
||||
/**
|
||||
* Returns the file path for a given bundle resource.
|
||||
@@ -80,47 +74,35 @@ interface KernelInterface extends HttpKernelInterface
|
||||
* where BundleName is the name of the bundle
|
||||
* and the remaining part is the relative path in the bundle.
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws \InvalidArgumentException if the file cannot be found or the name is not valid
|
||||
* @throws \RuntimeException if the name contains invalid/unsafe characters
|
||||
*/
|
||||
public function locateResource(string $name);
|
||||
public function locateResource(string $name): string;
|
||||
|
||||
/**
|
||||
* Gets the environment.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getEnvironment();
|
||||
public function getEnvironment(): string;
|
||||
|
||||
/**
|
||||
* Checks if debug mode is enabled.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDebug();
|
||||
public function isDebug(): bool;
|
||||
|
||||
/**
|
||||
* Gets the project dir (path of the project's composer file).
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getProjectDir();
|
||||
public function getProjectDir(): string;
|
||||
|
||||
/**
|
||||
* Gets the current container.
|
||||
*
|
||||
* @return ContainerInterface
|
||||
*/
|
||||
public function getContainer();
|
||||
public function getContainer(): ContainerInterface;
|
||||
|
||||
/**
|
||||
* Gets the request start time (not available if debug is disabled).
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getStartTime();
|
||||
public function getStartTime(): float;
|
||||
|
||||
/**
|
||||
* Gets the cache directory.
|
||||
@@ -128,22 +110,24 @@ interface KernelInterface extends HttpKernelInterface
|
||||
* Since Symfony 5.2, the cache directory should be used for caches that are written at runtime.
|
||||
* For caches and artifacts that can be warmed at compile-time and deployed as read-only,
|
||||
* use the new "build directory" returned by the {@see getBuildDir()} method.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCacheDir();
|
||||
public function getCacheDir(): string;
|
||||
|
||||
/**
|
||||
* Returns the build directory.
|
||||
*
|
||||
* This directory should be used to store build artifacts, and can be read-only at runtime.
|
||||
* Caches written at runtime should be stored in the "cache directory" ({@see KernelInterface::getCacheDir()}).
|
||||
*/
|
||||
public function getBuildDir(): string;
|
||||
|
||||
/**
|
||||
* Gets the log directory.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLogDir();
|
||||
public function getLogDir(): string;
|
||||
|
||||
/**
|
||||
* Gets the charset of the application.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCharset();
|
||||
public function getCharset(): string;
|
||||
}
|
||||
|
Reference in New Issue
Block a user