PHP 클래스 eZ\Publish\Core\FieldType\Image\IO\Legacy

Acts as a dispatcher between the two IOService instances required by FieldType\Image in Legacy. - One is the usual one, as used in ImageStorage, that uses 'images' as the prefix - The other is a special one, that uses 'images-versioned' as the prefix, in order to cope with content created from the backoffice To load a binary file, this service will first try with the normal IOService, and on exception, will fall back to the draft IOService. In addition, loadBinaryFile() will also hide the need to explicitly call getExternalPath() on the internal path stored in legacy.
상속: implements eZ\Publish\Core\IO\IOServiceInterface
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( eZ\Publish\Core\IO\IOServiceInterface $publishedIOService, eZ\Publish\Core\IO\IOServiceInterface $draftIOService, eZ\Publish\Core\FieldType\Image\IO\OptionsProvider $optionsProvider )
createBinaryFile ( BinaryFileCreateStruct $binaryFileCreateStruct )
deleteBinaryFile ( BinaryFile $binaryFile )
deleteDirectory ( string $path ) Deletes a directory.
exists ( $binaryFileId )
getExternalPath ( $internalId )
getFileContents ( BinaryFile $binaryFile )
getFileInputStream ( BinaryFile $binaryFile )
getInternalPath ( $externalId )
getMimeType ( $binaryFileId )
getUri ( $binaryFileId )
loadBinaryFile ( $binaryFileId )
loadBinaryFileByUri ( $binaryFileUri ) Since both services should use the same uri, we can use any of them to *GET* the URI.
newBinaryCreateStructFromLocalFile ( $localFile )
newBinaryCreateStructFromUploadedFile ( array $uploadedFile )
setPrefix ( $prefix ) Sets the IOService prefix.

보호된 메소드들

메소드 설명
isDraftImagePath ( string $internalPath ) : boolean Checks if $internalPath is a published image path.
isPublishedImagePath ( string $internalPath ) : boolean Checks if $internalPath is a published image path.

비공개 메소드들

메소드 설명
setPrefixes ( ) Computes the paths to published & draft images path using the options from the provider.

메소드 상세

__construct() 공개 메소드

public __construct ( eZ\Publish\Core\IO\IOServiceInterface $publishedIOService, eZ\Publish\Core\IO\IOServiceInterface $draftIOService, eZ\Publish\Core\FieldType\Image\IO\OptionsProvider $optionsProvider )
$publishedIOService eZ\Publish\Core\IO\IOServiceInterface
$draftIOService eZ\Publish\Core\IO\IOServiceInterface
$optionsProvider eZ\Publish\Core\FieldType\Image\IO\OptionsProvider

createBinaryFile() 공개 메소드

public createBinaryFile ( BinaryFileCreateStruct $binaryFileCreateStruct )
$binaryFileCreateStruct eZ\Publish\Core\IO\Values\BinaryFileCreateStruct

deleteBinaryFile() 공개 메소드

public deleteBinaryFile ( BinaryFile $binaryFile )
$binaryFile eZ\Publish\Core\IO\Values\BinaryFile

deleteDirectory() 공개 메소드

Deletes a directory.
public deleteDirectory ( string $path )
$path string

exists() 공개 메소드

public exists ( $binaryFileId )

getExternalPath() 공개 메소드

public getExternalPath ( $internalId )

getFileContents() 공개 메소드

public getFileContents ( BinaryFile $binaryFile )
$binaryFile eZ\Publish\Core\IO\Values\BinaryFile

getFileInputStream() 공개 메소드

public getFileInputStream ( BinaryFile $binaryFile )
$binaryFile eZ\Publish\Core\IO\Values\BinaryFile

getInternalPath() 공개 메소드

public getInternalPath ( $externalId )

getMimeType() 공개 메소드

public getMimeType ( $binaryFileId )

getUri() 공개 메소드

public getUri ( $binaryFileId )

isDraftImagePath() 보호된 메소드

Checks if $internalPath is a published image path.
protected isDraftImagePath ( string $internalPath ) : boolean
$internalPath string
리턴 boolean true if $internalPath is the path to a published image

isPublishedImagePath() 보호된 메소드

Checks if $internalPath is a published image path.
protected isPublishedImagePath ( string $internalPath ) : boolean
$internalPath string
리턴 boolean true if $internalPath is the path to a published image

loadBinaryFile() 공개 메소드

public loadBinaryFile ( $binaryFileId )

loadBinaryFileByUri() 공개 메소드

Since both services should use the same uri, we can use any of them to *GET* the URI.
public loadBinaryFileByUri ( $binaryFileUri )

newBinaryCreateStructFromLocalFile() 공개 메소드

public newBinaryCreateStructFromLocalFile ( $localFile )

newBinaryCreateStructFromUploadedFile() 공개 메소드

public newBinaryCreateStructFromUploadedFile ( array $uploadedFile )
$uploadedFile array

setPrefix() 공개 메소드

Sets the IOService prefix.
public setPrefix ( $prefix )