diff --git a/core/lib/Drupal/Core/HtmlPageController.php b/core/lib/Drupal/Core/HtmlPageController.php
index 27a9e4e694b5..7d14ac000973 100644
--- a/core/lib/Drupal/Core/HtmlPageController.php
+++ b/core/lib/Drupal/Core/HtmlPageController.php
@@ -20,14 +20,14 @@ class HtmlPageController implements ContainerAwareInterface {
/**
* The injection container for this object.
*
- * @var ContainerInterface
+ * @var \Symfony\Component\DependencyInjection\ContainerInterface
*/
protected $container;
/**
* Injects the service container used by this object.
*
- * @param ContainerInterface $container
+ * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The service container this object should use.
*/
public function setContainer(ContainerInterface $container = NULL) {
@@ -39,10 +39,11 @@ class HtmlPageController implements ContainerAwareInterface {
*
* @param Request $request
* The request object.
- * @param type $_content
+ * @param callable $_content
* The body content callable that contains the body region of this page.
*
* @return \Symfony\Component\HttpFoundation\Response
+ * A response object.
*/
public function content(Request $request, $_content) {
@@ -53,8 +54,12 @@ class HtmlPageController implements ContainerAwareInterface {
// https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/InternalController.php
$attributes = $request->attributes;
$controller = $_content;
+
+ // We need to clean off the derived information and such so that the
+ // subrequest can be processed properly without leaking data through.
$attributes->remove('system_path');
$attributes->remove('_content');
+
$response = $this->container->get('http_kernel')->forward($controller, $attributes->all(), $request->query->all());
$page_content = $response->getContent();
diff --git a/core/lib/Drupal/Core/Routing/ChainMatcher.php b/core/lib/Drupal/Core/Routing/ChainMatcher.php
index 2ef53b4dc51b..23410bfe3474 100644
--- a/core/lib/Drupal/Core/Routing/ChainMatcher.php
+++ b/core/lib/Drupal/Core/Routing/ChainMatcher.php
@@ -1,5 +1,10 @@
context = $context;
@@ -87,8 +90,10 @@ class ChainMatcher implements RequestMatcherInterface, RequestContextAwareInterf
*
* @return array An array of parameters
*
- * @throws ResourceNotFoundException If no matching resource could be found
- * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed
+ * @throws \Symfony\Component\Routing\Exception\ResourceNotFoundException
+ * If no matching resource could be found
+ * @throws \Symfony\Component\Routing\Exception\MethodNotAllowedException
+ * If a matching resource was found but the request method is not allowed
*/
public function matchRequest(Request $request) {
$methodNotAllowed = null;
diff --git a/core/lib/Drupal/Core/Routing/CompiledRoute.php b/core/lib/Drupal/Core/Routing/CompiledRoute.php
index cd0998a7a073..c5cdde8a9942 100644
--- a/core/lib/Drupal/Core/Routing/CompiledRoute.php
+++ b/core/lib/Drupal/Core/Routing/CompiledRoute.php
@@ -1,5 +1,10 @@
route;
}
/**
- * Returns the pattern.
- *
- * @return string
- * The pattern.
- */
+ * Returns the pattern.
+ *
+ * @return string
+ * The pattern.
+ */
public function getPattern() {
return $this->route->getPattern();
}
/**
- * Returns the options.
- *
- * @return array
- * The options.
- */
+ * Returns the options.
+ *
+ * @return array
+ * The options.
+ */
public function getOptions() {
return $this->route->getOptions();
}
/**
- * Returns the defaults.
- *
- * @return array
- * The defaults.
- */
+ * Returns the defaults.
+ *
+ * @return array
+ * The defaults.
+ */
public function getDefaults() {
return $this->route->getDefaults();
}
/**
- * Returns the requirements.
- *
- * @return array
- * The requirements.
- */
+ * Returns the requirements.
+ *
+ * @return array
+ * The requirements.
+ */
public function getRequirements() {
return $this->route->getRequirements();
}
diff --git a/core/lib/Drupal/Core/Routing/FinalMatcherInterface.php b/core/lib/Drupal/Core/Routing/FinalMatcherInterface.php
index 69683f59fbe3..8b85c21847ab 100644
--- a/core/lib/Drupal/Core/Routing/FinalMatcherInterface.php
+++ b/core/lib/Drupal/Core/Routing/FinalMatcherInterface.php
@@ -1,5 +1,10 @@
routes)) {
@@ -74,10 +80,10 @@ class MatcherDumper implements MatcherDumperInterface {
* Available options:
* - route_set: The route grouping that is being dumped. All existing
* routes with this route set will be deleted on dump.
- * - base_class: The base class name
+ * - base_class: The base class name.
*
* @param array $options
- * An array of options
+ * An array of options.
*/
public function dump(array $options = array()) {
$options += array(
@@ -136,7 +142,7 @@ class MatcherDumper implements MatcherDumperInterface {
/**
* Gets the routes to match.
*
- * @return RouteCollection
+ * @return \Symfony\Component\Routing\RouteCollection
* A RouteCollection instance representing all routes currently in the
* dumper.
*/
diff --git a/core/lib/Drupal/Core/Routing/NestedMatcher.php b/core/lib/Drupal/Core/Routing/NestedMatcher.php
index f8aed1161542..d1bc91d66ffa 100644
--- a/core/lib/Drupal/Core/Routing/NestedMatcher.php
+++ b/core/lib/Drupal/Core/Routing/NestedMatcher.php
@@ -43,14 +43,13 @@ class NestedMatcher implements NestedMatcherInterface {
*/
protected $context;
-
/**
* Adds a partial matcher to the matching plan.
*
* Partial matchers will be run in the order in which they are added.
*
- * @param PartialMatcherInterface $matcher
- * A partial.
+ * @param \Drupal\Core\Routing\PartialMatcherInterface $matcher
+ * A partial matcher.
*
* @return NestedMatcherInterface
* The current matcher.
@@ -64,11 +63,11 @@ class NestedMatcher implements NestedMatcherInterface {
/**
* Sets the final matcher for the matching plan.
*
- * @param UrlMatcherInterface $final
+ * @param \Drupal\Core\Routing\FinalMatcherInterface $final
* The matcher that will be called last to ensure only a single route is
* found.
*
- * @return NestedMatcherInterface
+ * @return \Drupal\Core\Routing\NestedMatcherInterface
* The current matcher.
*/
public function setFinalMatcher(FinalMatcherInterface $final) {
@@ -82,11 +81,11 @@ class NestedMatcher implements NestedMatcherInterface {
*
* Partial matchers will be run in the order in which they are added.
*
- * @param InitialMatcherInterface $matcher
+ * @param \Drupal\Core\Routing\InitialMatcherInterface $matcher
* An initial matcher. It is responsible for its own configuration and
* initial route collection
*
- * @return NestedMatcherInterface
+ * @return \Drupal\Core\Routing\NestedMatcherInterface
* The current matcher.
*/
public function setInitialMatcher(InitialMatcherInterface $initial) {
@@ -96,20 +95,22 @@ class NestedMatcher implements NestedMatcherInterface {
}
/**
- * Tries to match a request with a set of routes.
- *
- * If the matcher can not find information, it must throw one of the exceptions documented
- * below.
- *
- * @param Request $request
- * The request to match.
- *
- * @return array
- * An array of parameters.
- *
- * @throws ResourceNotFoundException If no matching resource could be found
- * @throws MethodNotAllowedException If a matching resource was found but the request method is not allowed
- */
+ * Tries to match a request with a set of routes.
+ *
+ * If the matcher can not find information, it must throw one of the
+ * exceptions documented below.
+ *
+ * @param \Symfony\Component\HttpFoundation\Request $request
+ * The request to match.
+ *
+ * @return array
+ * An array of parameters.
+ *
+ * @throws ResourceNotFoundException
+ * If no matching resource could be found.
+ * @throws MethodNotAllowedException
+ * If a matching resource was found but the request method is not allowed.
+ */
public function matchRequest(Request $request) {
$collection = $this->initialMatcher->matchRequestPartial($request);
@@ -130,7 +131,8 @@ class NestedMatcher implements NestedMatcherInterface {
*
* This method is unused. It is here only to satisfy the interface.
*
- * @param RequestContext $context The context
+ * @param \Symfony\Component\Routing\RequestContext $context
+ * The context
*/
public function setContext(RequestContext $context) {
$this->context = $context;
@@ -141,7 +143,8 @@ class NestedMatcher implements NestedMatcherInterface {
*
* This method is unused. It is here only to satisfy the interface.
*
- * @return RequestContext The context
+ * @return \Symfony\Component\Routing\RequestContext
+ * The context
*/
public function getContext() {
return $this->context;
diff --git a/core/lib/Drupal/Core/Routing/NestedMatcherInterface.php b/core/lib/Drupal/Core/Routing/NestedMatcherInterface.php
index cd55d32dd8c5..34018cc07f4c 100644
--- a/core/lib/Drupal/Core/Routing/NestedMatcherInterface.php
+++ b/core/lib/Drupal/Core/Routing/NestedMatcherInterface.php
@@ -1,5 +1,10 @@