You are here

class PathComponent in Drupal 7 to 8/9 Module Upgrader 8

Same name in this branch
  1. 8 src/Utility/Path/Drupal7/PathComponent.php \Drupal\drupalmoduleupgrader\Utility\Path\Drupal7\PathComponent
  2. 8 src/Utility/Path/Drupal8/PathComponent.php \Drupal\drupalmoduleupgrader\Utility\Path\Drupal8\PathComponent

Represents a single component in a Drupal 8 route path.

Hierarchy

Expanded class hierarchy of PathComponent

3 files declare their use of PathComponent
ParameterMap.php in src/Routing/ParameterMap.php
PathComponentTest.php in tests/src/Unit/Utility/Path/Drupal8/PathComponentTest.php
PathUtilityTest.php in tests/src/Unit/Utility/Path/Drupal8/PathUtilityTest.php

File

src/Utility/Path/Drupal8/PathComponent.php, line 10

Namespace

Drupal\drupalmoduleupgrader\Utility\Path\Drupal8
View source
class PathComponent extends PathComponentBase {

  /**
   * {@inheritdoc}
   */
  public function isWildcard() {
    return (bool) preg_match('/\\{[a-zA-Z0-9_]+\\}/', $this->value);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PathComponent::isWildcard public function Returns if this component is considered a wildcard. Overrides PathComponentInterface::isWildcard
PathComponentBase::$value protected property
PathComponentBase::__construct public function Constructs the path component. Overrides PathComponentInterface::__construct
PathComponentBase::__toString public function Overrides PathComponentInterface::__toString