PHP 클래스 Devise\Pages\Fields\Handlers\VideoFieldUpdated

파일 보기 프로젝트 열기: devisephp/cms 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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 video 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 ( $values, string $format ) : string Creates the filename for this video path and format
findUnprocessedVideos ( 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
noVideoPathDefined ( 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 video 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 ( $values, string $format ) : string
$format string
리턴 string

findUnprocessedVideos() 보호된 메소드

Find the videos that have yet to be processed by Zencoder and then we filter those out
protected findUnprocessedVideos ( 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

noVideoPathDefined() 보호된 메소드

Handle the case where the user removes the video or just doesn't specify a url path to a video
protected noVideoPathDefined ( 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