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

__construct() public method

Constructor.
public __construct ( BinaryFile $binaryFile, eZ\Publish\Core\IO\IOServiceInterface $ioService, integer $status = 200, array $headers = [], boolean $public = true, null | string $contentDisposition = null, boolean $autoLastModified = true )
$binaryFile eZ\Publish\Core\IO\Values\BinaryFile The name of the file to stream
$ioService eZ\Publish\Core\IO\IOServiceInterface The name of the file to stream
$status integer The response status code
$headers array An array of response headers
$public boolean Files are public by default
$contentDisposition null | string The type of Content-Disposition to set automatically with the filename
$autoLastModified boolean Whether the Last-Modified header should be automatically set
    public function __construct(BinaryFile $binaryFile, IOServiceInterface $ioService, $status = 200, $headers = array(), $public = true, $contentDisposition = null, $autoLastModified = true)
    {
        $this->ioService = $ioService;
        parent::__construct(null, $status, $headers);
        $this->setFile($binaryFile, $contentDisposition, $autoLastModified);
        if ($public) {
            $this->setPublic();
        }
    }