eZ\Bundle\EzPublishIOBundle\BinaryStreamResponse::setFile PHP Method

setFile() public method

Sets the file to stream.
public setFile ( SplFileInfo | string $file, string $contentDisposition = null, boolean $autoLastModified = true ) : BinaryFileResponse
$file SplFileInfo | string The file to stream
$contentDisposition string
$autoLastModified boolean
return Symfony\Component\HttpFoundation\BinaryFileResponse
    public function setFile($file, $contentDisposition = null, $autoLastModified = true)
    {
        $this->file = $file;
        if ($autoLastModified) {
            $this->setAutoLastModified();
        }
        if ($contentDisposition) {
            $this->setContentDisposition($contentDisposition);
        }
        return $this;
    }