From ed1c7bab5318d855861f60d139baf740883c391c Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 15 Jan 2015 23:59:45 +0000 Subject: [PATCH] Issue #2358369 by balagan, Katiemouse: getParameters() vs. getRawParameters() on RouteMatch should not be documented the same --- .../Core/Routing/RouteMatchInterface.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/core/lib/Drupal/Core/Routing/RouteMatchInterface.php b/core/lib/Drupal/Core/Routing/RouteMatchInterface.php index f0d9aa8dee..2937ec0cf0 100644 --- a/core/lib/Drupal/Core/Routing/RouteMatchInterface.php +++ b/core/lib/Drupal/Core/Routing/RouteMatchInterface.php @@ -39,7 +39,13 @@ public function getRouteName(); public function getRouteObject(); /** - * Returns the value of a named route parameter. + * Returns the processed value of a named route parameter. + * + * Raw URL parameters are processed by the parameter conversion system, which + * does operations such as converting entity ID parameters to fully-loaded + * entities. For example, the path node/12345 would have a raw node ID + * parameter value of 12345, while the processed parameter value would be the + * corresponding loaded node object. * * @param string $parameter_name * The parameter name. @@ -47,14 +53,24 @@ public function getRouteObject(); * @return mixed|null * The parameter value. NULL if the route doesn't define the parameter or * if the parameter value can't be determined from the request. + * + * @see \Drupal\Core\Routing\RouteMatchInterface::getRawParameter() */ public function getParameter($parameter_name); /** - * Returns the bag of all route parameters. + * Returns the bag of all processed route parameters. + * + * Raw URL parameters are processed by the parameter conversion system, which + * does operations such as converting entity ID parameters to fully-loaded + * entities. For example, the path node/12345 would have a raw node ID + * parameter value of 12345, while the processed parameter value would be the + * corresponding loaded node object. * * @return \Symfony\Component\HttpFoundation\ParameterBag * The parameter bag. + * + * @see \Drupal\Core\Routing\RouteMatchInterface::getRawParameters() */ public function getParameters(); @@ -68,6 +84,8 @@ public function getParameters(); * The raw (non-upcast) parameter value. NULL if the route doesn't define * the parameter or if the raw parameter value can't be determined from the * request. + * + * @see \Drupal\Core\Routing\RouteMatchInterface::getParameter() */ public function getRawParameter($parameter_name); @@ -76,6 +94,8 @@ public function getRawParameter($parameter_name); * * @return \Symfony\Component\HttpFoundation\ParameterBag * The parameter bag. + * + * @see \Drupal\Core\Routing\RouteMatchInterface::getParameters() */ public function getRawParameters(); -- GitLab