PHP Класс Spatie\MediaLibrary\Conversion\Conversion

Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$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() публичный Метод

public getExtractVideoFrameAtSecond ( ) : integer
Результат integer

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