annotate core/lib/Drupal/Core/DrupalKernelInterface.php @ 19:fa3358dc1485 tip

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