PHP 클래스 Spatie\MediaLibrary\Conversion\Conversion

파일 보기 프로젝트 열기: spatie/laravel-medialibrary 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$extractVideoFrameAtSecond integer
$manipulations array
$name name
$performOnCollections array
$performOnQueue boolean

공개 메소드들

메소드 설명
__construct ( string $name )
addAsFirstManipulation ( array $manipulation ) Add the given manipulation as the first manipulation.
create ( string $name )
getExtractVideoFrameAtSecond ( ) : integer
getManipulations ( ) : array Get the manipulations of this conversion.
getName ( ) : string
getResultExtension ( string $originalFileExtension = '' ) : string * Get the extension that the result of this conversion must have.
nonQueued ( ) Mark this conversion as one that should not be queued.
performOnCollections ( variadic $collectionNames ) Set the collection names on which this conversion must be performed.
queued ( ) Mark this conversion as one that should be queued.
setCrop ( integer $width, integer $height, integer $x, integer $y ) Crops the image to specific dimensions prior to any other resize operations.
setExtractVideoFrameAtSecond ( integer $timecode ) : Conversion * Set the timecode in seconds to extract a video thumbnail.
setFit ( string $fit ) Set the target fit.
setFormat ( string $format ) Set the target format.
setHeight ( integer $height ) Set the target height.
setManipulationParameter ( string $name, string $value ) Set the manipulation parameter.
setManipulations ( $manipulations ) Set the manipulations for this conversion.
setWidth ( integer $width ) Set the target width.
shouldBePerformedOn ( string $collectionName ) : boolean * Determine if this conversion should be performed on the given collection.
shouldBeQueued ( ) : boolean * Determine if the conversion should be queued.

보호된 메소드들

메소드 설명
containsFormatManipulation ( array $manipulations ) : boolean * Determine if the given manipulations contain a format manipulation.

메소드 상세

__construct() 공개 메소드

public __construct ( string $name )
$name string

addAsFirstManipulation() 공개 메소드

Add the given manipulation as the first manipulation.
public addAsFirstManipulation ( array $manipulation )
$manipulation array

containsFormatManipulation() 보호된 메소드

* Determine if the given manipulations contain a format manipulation.
protected containsFormatManipulation ( array $manipulations ) : boolean
$manipulations array
리턴 boolean

create() 공개 정적인 메소드

public static create ( string $name )
$name string

getExtractVideoFrameAtSecond() 공개 메소드

getManipulations() 공개 메소드

Get the manipulations of this conversion.
public getManipulations ( ) : array
리턴 array

getName() 공개 메소드

public getName ( ) : string
리턴 string

getResultExtension() 공개 메소드

* Get the extension that the result of this conversion must have.
public getResultExtension ( string $originalFileExtension = '' ) : string
$originalFileExtension string
리턴 string

nonQueued() 공개 메소드

Mark this conversion as one that should not be queued.
public nonQueued ( )

performOnCollections() 공개 메소드

Set the collection names on which this conversion must be performed.
public performOnCollections ( variadic $collectionNames )
$collectionNames variadic

queued() 공개 메소드

Mark this conversion as one that should be queued.
public queued ( )

setCrop() 공개 메소드

Crops the image to specific dimensions prior to any other resize operations.
public setCrop ( integer $width, integer $height, integer $x, integer $y )
$width integer
$height integer
$x integer
$y integer

setExtractVideoFrameAtSecond() 공개 메소드

Only used on video media.
public setExtractVideoFrameAtSecond ( integer $timecode ) : Conversion
$timecode integer
리턴 Conversion

setFit() 공개 메소드

Matches with Glide's 'fit'-parameter.
public setFit ( string $fit )
$fit string

setFormat() 공개 메소드

Matches with Glide's 'fm'-parameter.
public setFormat ( string $format )
$format string

setHeight() 공개 메소드

Matches with Glide's 'h'-parameter.
public setHeight ( integer $height )
$height integer

setManipulationParameter() 공개 메소드

Set the manipulation parameter.
public setManipulationParameter ( string $name, string $value )
$name string
$value string

setManipulations() 공개 메소드

Set the manipulations for this conversion.
public setManipulations ( $manipulations )
$manipulations

setWidth() 공개 메소드

Matches with Glide's 'w'-parameter.
public setWidth ( integer $width )
$width integer

shouldBePerformedOn() 공개 메소드

* Determine if this conversion should be performed on the given collection.
public shouldBePerformedOn ( string $collectionName ) : boolean
$collectionName string
리턴 boolean

shouldBeQueued() 공개 메소드

* Determine if the conversion should be queued.
public shouldBeQueued ( ) : boolean
리턴 boolean

프로퍼티 상세

$extractVideoFrameAtSecond 보호되어 있는 프로퍼티

protected int $extractVideoFrameAtSecond
리턴 integer

$manipulations 보호되어 있는 프로퍼티

protected array $manipulations
리턴 array

$name 보호되어 있는 프로퍼티

name
protected $name

$performOnCollections 보호되어 있는 프로퍼티

protected array $performOnCollections
리턴 array

$performOnQueue 보호되어 있는 프로퍼티

protected bool $performOnQueue
리턴 boolean