PHP 클래스 eZ\Bundle\EzPublishIOBundle\BinaryStreamResponse

상속: extends Symfony\Component\HttpFoundation\Response
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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