Neos\Flow\Mvc\Routing\UriBuilder::setFormat PHP Method

setFormat() public method

Specifies the format of the target (e.g. "html" or "xml")
public setFormat ( string $format ) : UriBuilder
$format string (e.g. "html" or "xml"), will be transformed to lowercase!
return UriBuilder the current UriBuilder to allow method chaining
    public function setFormat($format)
    {
        $this->format = strtolower($format);
        return $this;
    }

Usage Example

コード例 #1
0
 /**
  * @test
  */
 public function uriForSetsFormatArgumentIfSpecified()
 {
     $expectedArguments = ['@action' => 'index', '@controller' => 'somecontroller', '@package' => 'somepackage', '@format' => 'someformat'];
     $this->uriBuilder->setFormat('SomeFormat');
     $this->uriBuilder->uriFor('index', [], 'SomeController', 'SomePackage');
     $this->assertEquals($expectedArguments, $this->uriBuilder->getLastArguments());
 }
All Usage Examples Of Neos\Flow\Mvc\Routing\UriBuilder::setFormat