public function CompiledRoute::getNumParts

Returns the number of parts in this route's path.

The string "foo/bar/baz" has 3 parts, regardless of how many of them are placeholders.

Return value

int The number of parts in the path.

File

drupal/core/lib/Drupal/Core/Routing/CompiledRoute.php, line 95
Definition of Drupal\Core\Routing\CompiledRoute.

Class

CompiledRoute
Description of CompiledRoute

Namespace

Drupal\Core\Routing

Code

public function getNumParts() {
  return $this->numParts;
}