BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
EmbedVideo\VideoService Class Reference

Public Member Functions

 getHtml ()
 
 getVideoID ()
 
 setVideoID ($id)
 
 parseVideoID ($id)
 
 getExtraIDs ()
 
 getWidth ()
 
 setWidth ($width=null)
 
 getHeight ()
 
 setHeight ($height=null)
 
 getUrlArgs ()
 
 setUrlArgs ($urlArgs)
 
 isHttpsEnabled ()
 
 getDefaultWidth ()
 
 getDefaultRatio ()
 

Static Public Member Functions

static newFromName ($service)
 
static getServiceHostMap ()
 
static getAvailableServices ()
 
static addService ($service, $args)
 

Member Function Documentation

static EmbedVideo\VideoService::addService (   $service,
  $args 
)
static

Add a service

public

Parameters
stringService Name
mixedargs
static EmbedVideo\VideoService::getAvailableServices ( )
static

return an array of defined services

Returns
array $services
EmbedVideo\VideoService::getDefaultRatio ( )

Return default ratio if set.

public

Returns
mixed Integer ratio or false if not set.
EmbedVideo\VideoService::getDefaultWidth ( )

Return default width if set.

public

Returns
mixed Integer width or false if not set.
EmbedVideo\VideoService::getExtraIDs ( )

Return extra IDs.

public

Returns
boolean Array of extra information or false if not set.
EmbedVideo\VideoService::getHeight ( )

Return the height.

public

Returns
mixed Integer value or false for not set.
EmbedVideo\VideoService::getHtml ( )

Return built HTML.

public

Returns
mixed String HTML to output or false on error.
static EmbedVideo\VideoService::getServiceHostMap ( )
static

return the service host map array

Returns
array $serviceHostMap
EmbedVideo\VideoService::getUrlArgs ( )

Return the optional URL arguments.

public

Returns
mixed Integer value or false for not set.
EmbedVideo\VideoService::getVideoID ( )

Return Video ID

public

Returns
mixed Parsed Video ID or false for one that is not set.
EmbedVideo\VideoService::getWidth ( )

Return the width.

public

Returns
mixed Integer value or false for not set.
EmbedVideo\VideoService::isHttpsEnabled ( )

Is HTTPS enabled?

public

Returns
boolean
static EmbedVideo\VideoService::newFromName (   $service)
static

Create a new object from a service name.

public

Parameters
stringService Name
Returns
mixed New VideoService object or false on initialization error.
EmbedVideo\VideoService::parseVideoID (   $id)

Parse the video ID/URL provided.

public

Parameters
stringVideo ID/URL
Returns
mixed Parsed Video ID or false on failure.
EmbedVideo\VideoService::setHeight (   $height = null)

Set the height automatically by a ratio of the width or use the provided value.

public

Parameters
mixed[Optional] Height Value
Returns
void
EmbedVideo\VideoService::setUrlArgs (   $urlArgs)

Set URL Arguments to optionally add to the embed URL.

public

Parameters
stringRaw Arguments
Returns
boolean Success
EmbedVideo\VideoService::setVideoID (   $id)

Set the Video ID for this video.

public

Parameters
stringVideo ID/URL
Returns
boolean Success
EmbedVideo\VideoService::setWidth (   $width = null)

Set the width of the player. This also will set the height automatically. Width will be automatically constrained to the minimum and maximum widths.

public

Parameters
integerWidth
Returns
void

The documentation for this class was generated from the following file: