Documentation

VideoParser
in package

Table of Contents

Properties

$code  : mixed
$patterns  : mixed

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
since
1.1.4
access

public

getProvider()

Retrieves the video provider

public static getProvider(mixed $url) : mixed
Parameters
$url : mixed
Tags
since
1.1.4
access

public

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
since
1.1.4
access

public

strip()

Removes the matched bbcode pattern from the content

public static strip(mixed $content) : mixed
Parameters
$content : mixed
Tags
since
1.1.4
access

public


        
On this page

Search results