| Methods |
public
|
registerBundles(): iterable<mixed, BundleInterface>
Returns an array of bundles to register.
Returns an array of bundles to register.
|
#
|
public
|
registerContainerConfiguration(LoaderInterface $loader): void
Loads the container configuration.
Loads the container configuration.
|
#
|
public
|
boot(): void
Boots the current kernel.
Boots the current kernel.
|
#
|
public
|
shutdown(): void
Shutdowns the kernel.
Shutdowns the kernel.
This method is mainly useful when doing functional testing.
|
#
|
public
|
getBundles(): array<string, BundleInterface>
Gets the registered bundle instances.
Gets the registered bundle instances.
|
#
|
public
|
getBundle(string $name): BundleInterface
Returns a bundle.
|
#
|
public
|
locateResource(string $name): string
Returns the file path for a given bundle resource.
Returns the file path for a given bundle resource.
A Resource can be a file or a directory.
The resource name must follow the following pattern:
"@BundleName/path/to/a/file.something"
where BundleName is the name of the bundle
and the remaining part is the relative path in the bundle.
Throws
|
#
|
public
|
getEnvironment(): string
Gets the environment.
|
#
|
public
|
isDebug(): bool
Checks if debug mode is enabled.
Checks if debug mode is enabled.
|
#
|
public
|
getProjectDir(): string
Gets the project dir (path of the project's composer file).
Gets the project dir (path of the project's composer file).
|
#
|
public
|
getContainer(): ContainerInterface
Gets the current container.
Gets the current container.
|
#
|
public
|
getStartTime(): float
Gets the request start time (not available if debug is disabled).
Gets the request start time (not available if debug is disabled).
|
#
|
public
|
getCacheDir(): string
Gets the cache directory.
Gets the cache directory.
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.
|
#
|
public
|
getBuildDir(): string
Returns the build directory.
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
|
getLogDir(): string
Gets the log directory.
|
#
|
public
|
getCharset(): string
Gets the charset of the application.
Gets the charset of the application.
|
#
|