Commit fa58bbef authored by Crell's avatar Crell Committed by effulgentsia

Documentation fixes.

parent ce548387
<?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) {
......
<?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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment