CompiledRoute.php 1.14 KB
Newer Older
Crell's avatar
Crell committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

namespace Drupal\Core\Routing;

use Symfony\Component\Routing\CompiledRoute as SymfonyCompiledRoute;
use Symfony\Component\Routing\Route;

/**
 * Description of CompiledRoute
 */
class CompiledRoute extends SymfonyCompiledRoute {

  /**
   * The fitness of this route.
   *
   * @var int
   */
  protected $fit;

20
21
22
23
24
25
26
  /**
   * The pattern outline of this route.
   *
   * @var string
   */
  protected $patternOutline;

Crell's avatar
Crell committed
27
28
29
30
31
32
33
  /**
    * Constructor.
    *
    * @param Route  $route
    *   A original Route instance.
    * @param int $fit
    *   The fitness of the route.
34
35
    * @param string $fit
    *   The pattern outline for this route.
Crell's avatar
Crell committed
36
    */
37
  public function __construct(Route $route, $fit, $pattern_outline) {
Crell's avatar
Crell committed
38
39
40
41
42
43
    // We're ignoring the rest of this stuff; really this should be just using
    // an interface, but the Symfony component doesn't have one. This is a bug
    // in Symfony.
    parent::__construct($route, '', '', array(), array());

    $this->fit = $fit;
44
    $this->patternOutline = $pattern_outline;
Crell's avatar
Crell committed
45
46
47
48
49
50
  }

  public function getFit() {
    return $this->fit;
  }

51
52
53
54
  public function getPatternOutline() {
    return $this->patternOutline;
  }

Crell's avatar
Crell committed
55
56
}