VideoParser
in package
Table of Contents
Properties
Methods
- getAdapter() : mixed
- Retrieves the video provider object
- getProvider() : mixed
- Retrieves the video provider
- replace() : mixed
- Replace bbcode [video] contents
- strip() : mixed
- Removes the matched bbcode pattern from the content
Properties
$code
public
static mixed
$code
= '/\[video\](.*?)\[\/video\]/ms'
$patterns
public
static mixed
$patterns
= ['youtube.com' => 'youtube', 'youtu.be' => 'youtube', 'vimeo.com' => 'vimeo', 'dailymotion.com' => 'dailymotion', 'nicovideo.jp' => 'nicovideo', 'smule.com' => 'smule', 'facebook.com' => 'facebook', 'fb.watch' => 'facebook']
Methods
getAdapter()
Retrieves the video provider object
public
static getAdapter(mixed $url, mixed $width, mixed $height[, mixed $fullWidth = false ]) : mixed
Parameters
- $url : mixed
- $width : mixed
- $height : mixed
- $fullWidth : mixed = false
Tags
getProvider()
Retrieves the video provider
public
static getProvider(mixed $url) : mixed
Parameters
- $url : mixed
Tags
replace()
Replace bbcode [video] contents
public
static replace(mixed $contents, mixed $width, mixed $height[, mixed $fullWidth = false ][, mixed $amp = false ]) : mixed
Parameters
- $contents : mixed
- $width : mixed
- $height : mixed
- $fullWidth : mixed = false
- $amp : mixed = false
Tags
strip()
Removes the matched bbcode pattern from the content
public
static strip(mixed $content) : mixed
Parameters
- $content : mixed