5 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
6 use Symfony\Component\HttpKernel\HttpKernelInterface;
7 use Symfony\Component\HttpFoundation\Request;
10 * The interface for DrupalKernel, the core of Drupal.
12 * This interface extends Symfony's KernelInterface and adds methods for
13 * responding to modules being enabled or disabled during its lifetime.
15 interface DrupalKernelInterface extends HttpKernelInterface, ContainerAwareInterface {
18 * Boots the current kernel.
22 public function boot();
25 * Shuts down the kernel.
27 public function shutdown();
30 * Discovers available serviceProviders.
33 * The available serviceProviders.
35 public function discoverServiceProviders();
38 * Returns all registered service providers.
40 * @param string $origin
41 * The origin for which to return service providers; one of 'app' or 'site'.
44 * An associative array of ServiceProvider objects, keyed by name.
46 public function getServiceProviders($origin);
49 * Gets the current container.
51 * @return \Symfony\Component\DependencyInjection\ContainerInterface
52 * A ContainerInterface instance.
54 public function getContainer();
57 * Returns the cached container definition - if any.
59 * This also allows inspecting a built container for debugging purposes.
62 * The cached container definition or NULL if not found in cache.
64 public function getCachedContainerDefinition();
67 * Set the current site path.
70 * The current site path.
72 * @throws \LogicException
73 * In case the kernel is already booted.
75 public function setSitePath($path);
81 * The current site path.
83 public function getSitePath();
90 public function getAppRoot();
93 * Updates the kernel's list of modules to the new list.
95 * The kernel needs to update its bundle list and container to match the new
98 * @param array $module_list
99 * The new list of modules.
100 * @param array $module_filenames
101 * List of module filenames, keyed by module name.
103 public function updateModules(array $module_list, array $module_filenames = []);
106 * Force a container rebuild.
108 * @return \Symfony\Component\DependencyInjection\ContainerInterface
110 public function rebuildContainer();
113 * Invalidate the service container for the next request.
115 public function invalidateContainer();
118 * Prepare the kernel for handling a request without handling the request.
120 * @param \Symfony\Component\HttpFoundation\Request $request
121 * The current request.
125 * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Only used by
126 * legacy front-controller scripts.
128 public function prepareLegacyRequest(Request $request);
131 * Helper method that does request related initialization.
133 * @param \Symfony\Component\HttpFoundation\Request $request
134 * The current request.
136 public function preHandle(Request $request);
139 * Helper method that loads legacy Drupal include files.
141 public function loadLegacyIncludes();