interface KernelInterface implements HttpKernelInterface, Serializable
The Kernel is the heart of the Symfony system.
It manages an environment made of bundles.
Methods
| Response |
handle(Request $request, integer $type = self::MASTER_REQUEST, Boolean $catch = true)
Handles a Request to convert it to a Response. |
from HttpKernelInterface |
| BundleInterface[] |
registerBundles()
Returns an array of bundles to registers. |
|
|
registerContainerConfiguration(LoaderInterface $loader)
Loads the container configuration |
||
|
boot()
Boots the current kernel. |
||
|
shutdown()
Shutdowns the kernel. |
||
| BundleInterface[] |
getBundles()
Gets the registered bundle instances. |
|
| Boolean |
isClassInActiveBundle(string $class)
Checks if a given class name belongs to an active bundle. |
|
| BundleInterface|BundleInterface[] |
getBundle(string $name, Boolean $first = true)
Returns a bundle and optionally its descendants by its name. |
|
| string|array |
locateResource(string $name, string $dir = null, Boolean $first = true)
Returns the file path for a given resource. |
|
| string |
getName()
Gets the name of the kernel |
|
| string |
getEnvironment()
Gets the environment. |
|
| Boolean |
isDebug()
Checks if debug mode is enabled. |
|
| string |
getRootDir()
Gets the application root dir. |
|
| ContainerInterface |
getContainer()
Gets the current container. |
|
| integer |
getStartTime()
Gets the request start time (not available if debug is disabled). |
|
| string |
getCacheDir()
Gets the cache directory. |
|
| string |
getLogDir()
Gets the log directory. |
|
| string |
getCharset()
Gets the charset of the application. |
Details
in HttpKernelInterface at line 46
public Response
handle(Request $request, integer $type = self::MASTER_REQUEST, Boolean $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 37
public BundleInterface[]
registerBundles()
Returns an array of bundles to registers.
at line 46
public
registerContainerConfiguration(LoaderInterface $loader)
Loads the container configuration
at line 53
public
boot()
Boots the current kernel.
at line 62
public
shutdown()
Shutdowns the kernel.
This method is mainly useful when doing functional testing.
at line 71
public BundleInterface[]
getBundles()
Gets the registered bundle instances.
at line 82
public Boolean
isClassInActiveBundle(string $class)
Checks if a given class name belongs to an active bundle.
at line 96
public BundleInterface|BundleInterface[]
getBundle(string $name, Boolean $first = true)
Returns a bundle and optionally its descendants by its name.
at line 126
public string|array
locateResource(string $name, string $dir = null, Boolean $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:
at line 135
public string
getName()
Gets the name of the kernel
at line 144
public string
getEnvironment()
Gets the environment.
at line 153
public Boolean
isDebug()
Checks if debug mode is enabled.
at line 162
public string
getRootDir()
Gets the application root dir.
at line 171
public ContainerInterface
getContainer()
Gets the current container.
at line 180
public integer
getStartTime()
Gets the request start time (not available if debug is disabled).
at line 189
public string
getCacheDir()
Gets the cache directory.
at line 198
public string
getLogDir()
Gets the log directory.
at line 207
public string
getCharset()
Gets the charset of the application.