KernelInterface
interface KernelInterface implements HttpKernelInterface, Serializable
The Kernel is the heart of the Symfony system.
It manages an environment made of bundles.
Methods
Handles a Request to convert it to a Response.
Returns an array of bundles to register.
Boots the current kernel.
Shutdowns the kernel.
Gets the registered bundle instances.
Returns a bundle and optionally its descendants by its name.
Returns the file path for a given resource.
Gets the name of the kernel.
Gets the environment.
Checks if debug mode is enabled.
Gets the application root dir.
Gets the current container.
Gets the request start time (not available if debug is disabled).
Gets the cache directory.
Gets the log directory.
Gets the charset of the application.
Details
in HttpKernelInterface at line line 42
Response
handle(Request $request, int $type = self::MASTER_REQUEST, bool $catch = true)
Handles a Request to convert it to a Response.
When $catch is true, the implementation must catch all exceptions and do its best to convert them to a Response instance.
at line line 32
BundleInterface[]
registerBundles()
Returns an array of bundles to register.
at line line 39
registerContainerConfiguration(LoaderInterface $loader)
Loads the container configuration.
at line line 44
boot()
Boots the current kernel.
at line line 51
shutdown()
Shutdowns the kernel.
This method is mainly useful when doing functional testing.
at line line 58
BundleInterface[]
getBundles()
Gets the registered bundle instances.
at line line 70
BundleInterface|BundleInterface[]
getBundle(string $name, bool $first = true)
Returns a bundle and optionally its descendants by its name.
at line line 100
string|array
locateResource(string $name, string $dir = null, bool $first = true)
Returns the file path for a given 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.
If $dir is passed, and the first segment of the path is "Resources", this method will look for a file named:
$dir/<BundleName>/path/without/Resources
before looking in the bundle resource folder.
at line line 107
string
getName()
Gets the name of the kernel.
at line line 114
string
getEnvironment()
Gets the environment.
at line line 121
bool
isDebug()
Checks if debug mode is enabled.
at line line 128
string
getRootDir()
Gets the application root dir.
at line line 135
ContainerInterface
getContainer()
Gets the current container.
at line line 142
int
getStartTime()
Gets the request start time (not available if debug is disabled).
at line line 149
string
getCacheDir()
Gets the cache directory.
at line line 156
string
getLogDir()
Gets the log directory.
at line line 163
string
getCharset()
Gets the charset of the application.