PHP Класс Devise\Pages\Fields\Handlers\AudioFieldUpdated

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

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

Свойство Тип Описание
$formats array Formats that are valid to be encoded

Открытые методы

Метод Описание
__construct ( MediaPaths $MediaPaths, null $Encoder = null, Framework $Framework ) Construct a new VideoFieldUpdated instance
handle ( Field $field, array $input ) : array This is called anytime after we update a video field in devise

Защищенные методы

Метод Описание
buildSettings ( Field $field, array $input ) : array Build out the array of settings for the audio encoding
createTempHoldingFiles ( $unprocessed ) : void This just creates a blank file in the media-versions directory because if the user saves again (shortly after), we don't want to be sending multiple jobs to Zencoder.
filename ( FieldValues $values, string $format ) : string Creates the filename for this video path and format
findUnprocessedFiles ( Field $field, array $settings ) : array($unprocessed, Find the videos that have yet to be processed by Zencoder and then we filter those out
findUrlForFormat ( array $formats, string $find ) : string Find the url for the given formats
noAudioPathDefined ( Field $field, array $input ) : boolean Handle the case where the user removes the video or just doesn't specify a url path to a video
updateVersionUrls ( Field $field, $unprocessed, $duplicated ) : void Update the verion's urls for every format

Описание методов

__construct() публичный Метод

Construct a new VideoFieldUpdated instance
public __construct ( MediaPaths $MediaPaths, null $Encoder = null, Framework $Framework )
$MediaPaths Devise\Media\MediaPaths
$Encoder null
$Framework Devise\Support\Framework

buildSettings() защищенный Метод

Build out the array of settings for the audio encoding
protected buildSettings ( Field $field, array $input ) : array
$field Field
$input array
Результат array

createTempHoldingFiles() защищенный Метод

We only send versions of the video to Zencoder that don't exist locally as a file.
protected createTempHoldingFiles ( $unprocessed ) : void
$unprocessed
Результат void

filename() защищенный Метод

Creates the filename for this video path and format
protected filename ( FieldValues $values, string $format ) : string
$values FieldValues
$format string
Результат string

findUnprocessedFiles() защищенный Метод

Find the videos that have yet to be processed by Zencoder and then we filter those out
protected findUnprocessedFiles ( Field $field, array $settings ) : array($unprocessed,
$field Field
$settings array
Результат array($unprocessed,

findUrlForFormat() защищенный Метод

Find the url for the given formats
protected findUrlForFormat ( array $formats, string $find ) : string
$formats array
$find string
Результат string

handle() публичный Метод

This is called anytime after we update a video field in devise
public handle ( Field $field, array $input ) : array
$field Field
$input array
Результат array

noAudioPathDefined() защищенный Метод

Handle the case where the user removes the video or just doesn't specify a url path to a video
protected noAudioPathDefined ( Field $field, array $input ) : boolean
$field Field
$input array
Результат boolean

updateVersionUrls() защищенный Метод

Update the verion's urls for every format
protected updateVersionUrls ( Field $field, $unprocessed, $duplicated ) : void
$field Field
$unprocessed
$duplicated
Результат void

Описание свойств

$formats защищенное свойство

Formats that are valid to be encoded
protected array $formats
Результат array