PHP Class eZ\Bundle\EzPublishIOBundle\BinaryStreamResponse

Inheritance: extends Symfony\Component\HttpFoundation\Response
Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$file eZ\Publish\Core\IO\Values\BinaryFile
$ioService eZ\Publish\Core\IO\IOServiceInterface
$maxlen
$offset
$trustXSendfileTypeHeader

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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 méthode

public getContent ( )

getFile() public méthode

Gets the file.
public getFile ( ) : BinaryFile
Résultat eZ\Publish\Core\IO\Values\BinaryFile The file to stream

prepare() public méthode

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

sendContent() public méthode

Sends the file.
public sendContent ( )

setAutoLastModified() public méthode

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

setContent() public méthode

public setContent ( $content )

setContentDisposition() public méthode

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
Résultat BinaryStreamResponse

setFile() public méthode

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
Résultat Symfony\Component\HttpFoundation\BinaryFileResponse

Property Details

$file protected_oe property

protected BinaryFile,eZ\Publish\Core\IO\Values $file
Résultat eZ\Publish\Core\IO\Values\BinaryFile

$ioService protected_oe property

protected IOServiceInterface,eZ\Publish\Core\IO $ioService
Résultat eZ\Publish\Core\IO\IOServiceInterface

$maxlen protected_oe property

protected $maxlen

$offset protected_oe property

protected $offset

$trustXSendfileTypeHeader protected_oe static_oe property

protected static $trustXSendfileTypeHeader