/** * Returns the value of the binding. If the value is an instance of * \Drupal\drupalmoduleupgrader\Utility\Path\PathComponentInterface, * the binding expects to be physically represented in the path, although * it may not yet be (this can be ascertained by the inPath() method). Any * other value is used verbatim. * * @return mixed */ public function getValue() { if ($this->hasArgument()) { if ($this->isPathPosition()) { $position = $this->getArgument(); return $this->path->containsKey($position) ? $this->path[$position] : new PathComponent('%'); } else { return $this->getArgument(); } } else { $value = $this->getParameter()->getValue(); if ($value instanceof ScalarNode) { return $value->toValue(); } } }