Further modules included.
[yaffs-website] / web / modules / contrib / drupalmoduleupgrader / src / Utility / Path / Drupal7 / PathComponent.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\drupalmoduleupgrader\Utility\Path\Drupal7\PathComponent.
6  */
7
8 namespace Drupal\drupalmoduleupgrader\Utility\Path\Drupal7;
9
10 use Drupal\drupalmoduleupgrader\Utility\Path\PathComponentBase;
11
12 /**
13  * Represents a single component in a Drupal 7 route path.
14  */
15 class PathComponent extends PathComponentBase {
16
17   /**
18    * Returns if this component is a generic placeholder (%).
19    *
20    * @return boolean
21    */
22   public function isPlaceholder() {
23     return $this->value == '%';
24   }
25
26   /**
27    * {@inheritdoc}
28    */
29   public function isWildcard() {
30     return (boolean) preg_match('/%[a-zA-Z0-9_]+/', $this->value);
31   }
32
33 }