PHP Class Devise\Media\Encoding\ZencoderJob

Show file Open project: devisephp/cms

Protected Properties

Property Type Description
$FileDownloader Devise\Media\Files\FileDownloader
$apiKey string
$notifications array

Public Methods

Method Description
__construct ( string $apiKey, array $notifications, FileDownloader $FileDownloader, Framework $Framework ) Create a new ZencoderJob
create ( string $filePath, array $settings ) : Job Create a new job with this file path and settings
handle ( $output, $storagePath ) : void Fire events when you see this job has been called back

Protected Methods

Method Description
assertValidSettings ( array $settings ) : void Validate that our settings are in correct format
buildOutputSettings ( $filePath, $allSettings ) : array Build up output settings for all the current settings passed into as an array

Method Details

__construct() public method

Create a new ZencoderJob
public __construct ( string $apiKey, array $notifications, FileDownloader $FileDownloader, Framework $Framework )
$apiKey string
$notifications array
$FileDownloader Devise\Media\Files\FileDownloader
$Framework Devise\Support\Framework

assertValidSettings() protected method

Validate that our settings are in correct format
protected assertValidSettings ( array $settings ) : void
$settings array
return void

buildOutputSettings() protected method

Build up output settings for all the current settings passed into as an array
protected buildOutputSettings ( $filePath, $allSettings ) : array
$filePath
$allSettings
return array

create() public method

For an idea of different output settings see api docs at https://app.zencoder.com/docs/api/encoding
public create ( string $filePath, array $settings ) : Job
$filePath string path to the video file you want to encode
$settings array custom settings
return Job

handle() public method

Fire events when you see this job has been called back
public handle ( $output, $storagePath ) : void
$output
$storagePath
return void

Property Details

$FileDownloader protected property

protected FileDownloader,Devise\Media\Files $FileDownloader
return Devise\Media\Files\FileDownloader

$apiKey protected property

protected string $apiKey
return string

$notifications protected property

protected array $notifications
return array