PHP Class Devise\Pages\Fields\Handlers\AudioFieldUpdated

Afficher le fichier Open project: devisephp/cms Class Usage Examples

Protected Properties

Свойство Type Description
$formats array Formats that are valid to be encoded

Méthodes publiques

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

Méthodes protégées

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

Method Details

__construct() public méthode

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

Build out the array of settings for the audio encoding
protected buildSettings ( Field $field, array $input ) : array
$field Field
$input array
Résultat array

createTempHoldingFiles() protected méthode

We only send versions of the video to Zencoder that don't exist locally as a file.
protected createTempHoldingFiles ( $unprocessed ) : void
$unprocessed
Résultat void

filename() protected méthode

Creates the filename for this video path and format
protected filename ( FieldValues $values, string $format ) : string
$values FieldValues
$format string
Résultat string

findUnprocessedFiles() protected méthode

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
Résultat array($unprocessed,

findUrlForFormat() protected méthode

Find the url for the given formats
protected findUrlForFormat ( array $formats, string $find ) : string
$formats array
$find string
Résultat string

handle() public méthode

This is called anytime after we update a video field in devise
public handle ( Field $field, array $input ) : array
$field Field
$input array
Résultat array

noAudioPathDefined() protected méthode

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
Résultat boolean

updateVersionUrls() protected méthode

Update the verion's urls for every format
protected updateVersionUrls ( Field $field, $unprocessed, $duplicated ) : void
$field Field
$unprocessed
$duplicated
Résultat void

Property Details

$formats protected_oe property

Formats that are valid to be encoded
protected array $formats
Résultat array