Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
fa58bbef
Commit
fa58bbef
authored
12 years ago
by
Larry Garfield
Committed by
Alex Bronstein
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Documentation fixes.
parent
ce548387
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/lib/Drupal/Core/Routing/PathMatcher.php
+16
-5
16 additions, 5 deletions
core/lib/Drupal/Core/Routing/PathMatcher.php
core/lib/Drupal/Core/Routing/RouteCompiler.php
+12
-4
12 additions, 4 deletions
core/lib/Drupal/Core/Routing/RouteCompiler.php
with
28 additions
and
9 deletions
core/lib/Drupal/Core/Routing/PathMatcher.php
+
16
−
5
View file @
fa58bbef
<?php
/**
* @file
* Definition of Drupal\Core\Routing\PathMatcher.
*/
namespace
Drupal\Core\Routing
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -9,9 +14,7 @@
use
Drupal\Core\Database\Connection
;
/**
* Description of PathMatcher
*
* @author crell
* Initial matcher to match a route against a built database, by path.
*/
class
PathMatcher
implements
InitialMatcherInterface
{
/**
...
...
@@ -28,6 +31,14 @@ class PathMatcher implements InitialMatcherInterface {
*/
protected
$tableName
;
/**
* Constructs a new PathMatcher.
*
* @param \Drupal\Core\Database\Connection $connection
* A database connection object.
* @param string $table
* The table in the database to use for matching.
*/
public
function
__construct
(
Connection
$connection
,
$table
=
'router'
)
{
$this
->
connection
=
$connection
;
$this
->
tableName
=
$table
;
...
...
@@ -36,10 +47,10 @@ public function __construct(Connection $connection, $table = 'router') {
/**
* Matches a request against multiple routes.
*
* @param Request $request
* @param
\Symfony\Component\HttpFoundation\
Request $request
* A Request object against which to match.
*
* @return RouteCollection
* @return
\Symfony\Component\Routing\
RouteCollection
* A RouteCollection of matched routes.
*/
public
function
matchRequestPartial
(
Request
$request
)
{
...
...
This diff is collapsed.
Click to expand it.
core/lib/Drupal/Core/Routing/RouteCompiler.php
+
12
−
4
View file @
fa58bbef
<?php
/**
* @file
* Definition of Drupal\Core\Routing\RouteCompiler.
*/
namespace
Drupal\Core\Routing
;
use
Symfony\Component\Routing\RouteCompilerInterface
;
use
Symfony\Component\Routing\Route
;
/**
*
Description of RouteCompiler
*
Compiler to generate derived information from a Route necessary for matching.
*/
class
RouteCompiler
implements
RouteCompilerInterface
{
...
...
@@ -15,12 +20,15 @@ class RouteCompiler implements RouteCompilerInterface {
*/
const
MAX_PARTS
=
9
;
/**
* Utility constant to use for regular expressions against the path.
*/
const
REGEX_DELIMITER
=
'#'
;
/**
* Compiles the current route instance.
*
* @param Route $route
* @param
\Symfony\Component\Routing\
Route $route
* A Route instance
*
* @return CompiledRoute
...
...
@@ -50,7 +58,7 @@ public function compile(Route $route) {
* It is not factored out nicely there, so we cannot simply subclass it.
* @todo Refactor Symfony's RouteCompiler so that it's useful to subclass.
*
* @param Route $route
* @param
\Symfony\Component\Routing\
Route $route
* The route object.
* @param string $pattern
* The pattern for which we want a matching regex.
...
...
@@ -208,7 +216,7 @@ public function getFit($path) {
* with default values don't make sense anyway, so that should not be a
* problem.
*
* @param Route $route
* @param
\Symfony\Component\Routing\
Route $route
*
* @return string
* The path string, stripped of placeholders that have default values.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment