Neos\FluidAdaptor\ViewHelpers\Format\UrlencodeViewHelper::render PHP Method

render() public method

Escapes special characters with their escaped counterparts as needed using PHPs urlencode() function.
See also: http://www.php.net/manual/function.urlencode.php
public render ( string $value = null ) : mixed
$value string string to format
return mixed
    public function render($value = null)
    {
        return self::renderStatic(array('value' => $value), $this->buildRenderChildrenClosure(), $this->renderingContext);
    }

Usage Example

 /**
  * @test
  */
 public function renderRendersObjectWithToStringMethod()
 {
     $source = new Uri('http://typo3.com/foo&bar=1');
     $actualResult = $this->viewHelper->render($source);
     $this->assertEquals(urlencode('http://typo3.com/foo&bar=1'), $actualResult);
 }
UrlencodeViewHelper