Public Member Functions

MediaProviderInterface Interface Reference

interface used by media provider helper as (youtube, vimeo, ...) More...

Inheritance diagram for MediaProviderInterface:
VimeoHelper YoutubeHelper

List of all members.

Public Member Functions

 isSourceAvailable (array $object)
 Return true if source is available for $object else return false.
 source (array $object)
 Return an array with url to the source and related mime type If source is not available it should return an empty array.
 embed (array $object, array $attributes)
 Return the html to embed using provider UI.
 thumbnail (array $object, array $htmlAttributes, $URLonly)
 Return the thumbnail supplied by provider as.

Detailed Description

interface used by media provider helper as (youtube, vimeo, ...)

Definition at line 25 of file media_provider_interface.php.


Member Function Documentation

MediaProviderInterface::embed ( array $  object,
array $  attributes 
)

Return the html to embed using provider UI.

Parameters:
array $object a representation of BEdita object
array $attributes HTML attributes
Returns:
string|boolean return false if it fails to get data

Implemented in VimeoHelper, and YoutubeHelper.

MediaProviderInterface::isSourceAvailable ( array $  object  ) 

Return true if source is available for $object else return false.

Parameters:
array $object a representation of BEdita object
Returns:
boolean

Implemented in VimeoHelper, and YoutubeHelper.

MediaProviderInterface::source ( array $  object  ) 

Return an array with url to the source and related mime type If source is not available it should return an empty array.

The array returned should be in the form ``` array( 'url' => 'http://example.com/video.mpg', 'mime_type' => 'video/mpeg' ) ```

Parameters:
array $object a representation of BEdita object
Returns:
array

Implemented in VimeoHelper, and YoutubeHelper.

MediaProviderInterface::thumbnail ( array $  object,
array $  htmlAttributes,
URLonly 
)

Return the thumbnail supplied by provider as.

tag If $URLonly is true return only the url to img

Parameters:
array $object a representation of BEdita object
array $htmlAttributes HTML attributes to set in tag
boolean $URLonly true to return only the image url
Returns:
string

Implemented in VimeoHelper, and YoutubeHelper.


The documentation for this interface was generated from the following file:
Generated on Fri Dec 11 2015 15:29:47 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus