Neos\Flow\Mvc\ActionRequest::setFormat PHP Метод

setFormat() публичный Метод

Sets the requested representation format
public setFormat ( string $format ) : void
$format string The desired format, something like "html", "xml", "png", "json" or the like. Can even be something like "rss.xml".
Результат void
    public function setFormat($format)
    {
        $this->format = strtolower($format);
    }

Usage Example

 /**
  * @test
  */
 public function theRepresentationFormatCanBeSetAndRetrieved()
 {
     $this->actionRequest->setFormat('html');
     $this->assertEquals('html', $this->actionRequest->getFormat());
     $this->actionRequest->setFormat('doc');
     $this->assertEquals('doc', $this->actionRequest->getFormat());
     $this->actionRequest->setFormat('hTmL');
     $this->assertEquals('html', $this->actionRequest->getFormat());
 }
All Usage Examples Of Neos\Flow\Mvc\ActionRequest::setFormat