PHP Класс eZ\Bundle\EzPublishIOBundle\BinaryStreamResponse

Наследование: extends Symfony\Component\HttpFoundation\Response
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$file eZ\Publish\Core\IO\Values\BinaryFile
$ioService eZ\Publish\Core\IO\IOServiceInterface
$maxlen
$offset
$trustXSendfileTypeHeader

Открытые методы

Метод Описание
__construct ( BinaryFile $binaryFile, eZ\Publish\Core\IO\IOServiceInterface $ioService, integer $status = 200, array $headers = [], boolean $public = true, null | string $contentDisposition = null, boolean $autoLastModified = true ) Constructor.
getContent ( )
getFile ( ) : BinaryFile Gets the file.
prepare ( Request $request )
sendContent ( ) Sends the file.
setAutoLastModified ( ) Automatically sets the Last-Modified header according the file modification date.
setContent ( $content )
setContentDisposition ( string $disposition, string $filename = '', string $filenameFallback = '' ) : BinaryStreamResponse Sets the Content-Disposition header with the given filename.
setFile ( SplFileInfo | string $file, string $contentDisposition = null, boolean $autoLastModified = true ) : BinaryFileResponse Sets the file to stream.

Описание методов

__construct() публичный метод

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

getContent() публичный метод

public getContent ( )

getFile() публичный метод

Gets the file.
public getFile ( ) : BinaryFile
Результат eZ\Publish\Core\IO\Values\BinaryFile The file to stream

prepare() публичный метод

public prepare ( Request $request )
$request Symfony\Component\HttpFoundation\Request

sendContent() публичный метод

Sends the file.
public sendContent ( )

setAutoLastModified() публичный метод

Automatically sets the Last-Modified header according the file modification date.
public setAutoLastModified ( )

setContent() публичный метод

public setContent ( $content )

setContentDisposition() публичный метод

Sets the Content-Disposition header with the given filename.
public setContentDisposition ( string $disposition, string $filename = '', string $filenameFallback = '' ) : BinaryStreamResponse
$disposition string ResponseHeaderBag::DISPOSITION_INLINE or ResponseHeaderBag::DISPOSITION_ATTACHMENT
$filename string Optionally use this filename instead of the real name of the file
$filenameFallback string A fallback filename, containing only ASCII characters. Defaults to an automatically encoded filename
Результат BinaryStreamResponse

setFile() публичный метод

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
Результат Symfony\Component\HttpFoundation\BinaryFileResponse

Описание свойств

$file защищенное свойство

protected BinaryFile,eZ\Publish\Core\IO\Values $file
Результат eZ\Publish\Core\IO\Values\BinaryFile

$ioService защищенное свойство

protected IOServiceInterface,eZ\Publish\Core\IO $ioService
Результат eZ\Publish\Core\IO\IOServiceInterface

$maxlen защищенное свойство

protected $maxlen

$offset защищенное свойство

protected $offset

$trustXSendfileTypeHeader защищенное статическое свойство

protected static $trustXSendfileTypeHeader