Upgraded drupal core with security updates
[yaffs-website] / web / core / lib / Drupal / Core / DrupalKernelInterface.php
1 <?php
2
3 namespace Drupal\Core;
4
5 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
6 use Symfony\Component\HttpKernel\HttpKernelInterface;
7 use Symfony\Component\HttpFoundation\Request;
8
9 /**
10  * The interface for DrupalKernel, the core of Drupal.
11  *
12  * This interface extends Symfony's KernelInterface and adds methods for
13  * responding to modules being enabled or disabled during its lifetime.
14  */
15 interface DrupalKernelInterface extends HttpKernelInterface, ContainerAwareInterface {
16
17   /**
18    * Boots the current kernel.
19    *
20    * @return $this
21    */
22   public function boot();
23
24   /**
25    * Shuts down the kernel.
26    */
27   public function shutdown();
28
29   /**
30    * Discovers available serviceProviders.
31    *
32    * @return array
33    *   The available serviceProviders.
34    */
35   public function discoverServiceProviders();
36
37   /**
38    * Returns all registered service providers.
39    *
40    * @param string $origin
41    *   The origin for which to return service providers; one of 'app' or 'site'.
42    *
43    * @return array
44    *   An associative array of ServiceProvider objects, keyed by name.
45    */
46   public function getServiceProviders($origin);
47
48   /**
49    * Gets the current container.
50    *
51    * @return \Symfony\Component\DependencyInjection\ContainerInterface
52    *   A ContainerInterface instance.
53    */
54   public function getContainer();
55
56   /**
57    * Returns the cached container definition - if any.
58    *
59    * This also allows inspecting a built container for debugging purposes.
60    *
61    * @return array|null
62    *   The cached container definition or NULL if not found in cache.
63    */
64   public function getCachedContainerDefinition();
65
66   /**
67    * Set the current site path.
68    *
69    * @param string $path
70    *   The current site path.
71    *
72    * @throws \LogicException
73    *   In case the kernel is already booted.
74    */
75   public function setSitePath($path);
76
77   /**
78    * Get the site path.
79    *
80    * @return string
81    *   The current site path.
82    */
83   public function getSitePath();
84
85   /**
86    * Gets the app root.
87    *
88    * @return string
89    */
90   public function getAppRoot();
91
92   /**
93    * Updates the kernel's list of modules to the new list.
94    *
95    * The kernel needs to update its bundle list and container to match the new
96    * list.
97    *
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.
102    */
103   public function updateModules(array $module_list, array $module_filenames = []);
104
105   /**
106    * Force a container rebuild.
107    *
108    * @return \Symfony\Component\DependencyInjection\ContainerInterface
109    */
110   public function rebuildContainer();
111
112   /**
113    * Invalidate the service container for the next request.
114    */
115   public function invalidateContainer();
116
117   /**
118    * Prepare the kernel for handling a request without handling the request.
119    *
120    * @param \Symfony\Component\HttpFoundation\Request $request
121    *   The current request.
122    *
123    * @return $this
124    *
125    * @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Only used by
126    *   legacy front-controller scripts.
127    */
128   public function prepareLegacyRequest(Request $request);
129
130   /**
131    * Helper method that does request related initialization.
132    *
133    * @param \Symfony\Component\HttpFoundation\Request $request
134    *   The current request.
135    */
136   public function preHandle(Request $request);
137
138   /**
139    * Helper method that loads legacy Drupal include files.
140    */
141   public function loadLegacyIncludes();
142
143 }