PHP Class Spatie\MediaLibrary\Conversion\Conversion

Afficher le fichier Open project: spatie/laravel-medialibrary Class Usage Examples

Protected Properties

Свойство Type Description
$extractVideoFrameAtSecond integer
$manipulations array
$name name
$performOnCollections array
$performOnQueue boolean

Méthodes publiques

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

Méthodes protégées

Méthode Description
containsFormatManipulation ( array $manipulations ) : boolean * Determine if the given manipulations contain a format manipulation.

Method Details

__construct() public méthode

public __construct ( string $name )
$name string

addAsFirstManipulation() public méthode

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

containsFormatManipulation() protected méthode

* Determine if the given manipulations contain a format manipulation.
protected containsFormatManipulation ( array $manipulations ) : boolean
$manipulations array
Résultat boolean

create() public static méthode

public static create ( string $name )
$name string

getExtractVideoFrameAtSecond() public méthode

getManipulations() public méthode

Get the manipulations of this conversion.
public getManipulations ( ) : array
Résultat array

getName() public méthode

public getName ( ) : string
Résultat string

getResultExtension() public méthode

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

nonQueued() public méthode

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

performOnCollections() public méthode

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

queued() public méthode

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

setCrop() public méthode

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() public méthode

Only used on video media.
public setExtractVideoFrameAtSecond ( integer $timecode ) : Conversion
$timecode integer
Résultat Conversion

setFit() public méthode

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

setFormat() public méthode

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

setHeight() public méthode

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

setManipulationParameter() public méthode

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

setManipulations() public méthode

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

setWidth() public méthode

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

shouldBePerformedOn() public méthode

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

shouldBeQueued() public méthode

* Determine if the conversion should be queued.
public shouldBeQueued ( ) : boolean
Résultat boolean

Property Details

$extractVideoFrameAtSecond protected_oe property

protected int $extractVideoFrameAtSecond
Résultat integer

$manipulations protected_oe property

protected array $manipulations
Résultat array

$name protected_oe property

name
protected $name

$performOnCollections protected_oe property

protected array $performOnCollections
Résultat array

$performOnQueue protected_oe property

protected bool $performOnQueue
Résultat boolean