public function MatcherDumper::getFit

Determines the fitness of the provided path.

Parameters

string $path: The path whose fitness we want.

Return value

int The fitness of the path, as an integer.

File

drupal/core/lib/Drupal/Core/Routing/MatcherDumper.php, line 157
Definition of Drupal\Core\Routing\MatcherDumper.

Class

MatcherDumper
Dumps Route information to a database table.

Namespace

Drupal\Core\Routing

Code

public function getFit($path) {
  $fit = 0;
  $parts = explode('/', $path, static::MAX_PARTS);
  foreach ($parts as $k => $part) {
    if (strpos($part, '{') === FALSE) {
      $fit |= 1 << $slashes - $k;
    }
  }
  return $fit;
}