Neos\Flow\Mvc\Routing\StaticRoutePart::resolve PHP Method

resolve() public method

Sets the Route Part value to the Route Part name and returns TRUE if successful.
public resolve ( array &$routeValues ) : boolean
$routeValues array not used but needed to implement \Neos\Flow\Mvc\Routing\AbstractRoutePart
return boolean
    public function resolve(array &$routeValues)
    {
        if ($this->name === null || $this->name === '') {
            return false;
        }
        $this->value = $this->name;
        if ($this->lowerCase) {
            $this->value = strtolower($this->value);
        }
        return true;
    }

Usage Example

 /**
  * @test
  */
 public function staticRoutePartDoesNotAlterCaseIfLowerCaseIsFalse()
 {
     $routePart = new Mvc\Routing\StaticRoutePart();
     $routePart->setName('SomeName');
     $routePart->setLowerCase(false);
     $routeValues = [];
     $routePart->resolve($routeValues);
     $this->assertEquals('SomeName', $routePart->getValue(), 'By default Static Route Part should not alter the case of name');
 }