EasyBlogVideos
extends EasyBlog
in package
Table of Contents
Properties
- $app : mixed
- $config : mixed
- $db : mixed
- $doc : mixed
- $input : mixed
- $jconfig : mixed
- $lang : mixed
- $my : mixed
- $string : mixed
- $providers : mixed
Methods
- __construct() : mixed
- format() : mixed
- Used in conjunction with EB::formatter()
- formatContent() : mixed
- Formats the content with the appropriate video codes
- getDomain() : mixed
- Detects the domain provider of the embedded video link
- getError() : mixed
- getErrors() : mixed
- getItems() : mixed
- Retrieves a list of videos in an array
- getProviderEmbedCodes() : mixed
- Processes an embedded video hyperlink with the appropriate embed codes.
- getVideoObjects() : array<string|int, mixed>
- Given a set of content, try to match and return the list of videos that are found in the content.
- hasError() : mixed
- hasErrors() : mixed
- isMobile() : mixed
- Determines if this is a mobile layout
- isTablet() : mixed
- Determines if this is a tablet layout
- loadLanguage() : mixed
- Helper method to load language
- processAMP() : mixed
- processExternalVideos() : mixed
- Processes videos that are embedded on the post.
- processInstantVideos() : mixed
- processUploadedVideos() : mixed
- Search and replace videos that are uploaded to the site.
- processVideoLink() : mixed
- Retrieve the embed codes from specific video provider
- processVideos() : mixed
- Processes video codes and converts it accordingly.
- setError() : mixed
- strip() : mixed
- Removes any video codes from the content
- stripCodes() : mixed
- Used in conjunction with EB::formatter()
Properties
$app
public
mixed
$app
= \null
$config
public
mixed
$config
= \null
$db
public
mixed
$db
= \null
$doc
public
mixed
$doc
= \null
$input
public
mixed
$input
= \null
$jconfig
public
mixed
$jconfig
= \null
$lang
public
mixed
$lang
= \null
$my
public
mixed
$my
= \null
$string
public
mixed
$string
= \null
$providers
private
mixed
$providers
= ['youtube.com' => 'youtube', 'youtu.be' => 'youtube', 'vimeo.com' => 'vimeo', 'yahoo.com' => 'yahoo', 'metacafe.com' => 'metacafe', 'google.com' => 'google', 'liveleak.com' => 'liveleak', 'revver.com' => 'revver', 'dailymotion.com' => 'dailymotion', 'nicovideo.jp' => 'nicovideo', 'blip.tv' => 'blip', 'soundcloud.com' => 'soundcloud']
Methods
__construct()
public
__construct() : mixed
format()
Used in conjunction with EB::formatter()
public
format(EasyBlogPost &$post[, mixed $plain = false ][, mixed $useRelative = false ]) : mixed
Parameters
- $post : EasyBlogPost
- $plain : mixed = false
- $useRelative : mixed = false
Tags
formatContent()
Formats the content with the appropriate video codes
public
formatContent(mixed $content[, mixed $plain = false ][, mixed $useRelative = false ]) : mixed
Parameters
- $content : mixed
- $plain : mixed = false
- $useRelative : mixed = false
Tags
getDomain()
Detects the domain provider of the embedded video link
public
getDomain(mixed $link) : mixed
Parameters
- $link : mixed
Tags
getError()
public
getError() : mixed
getErrors()
public
getErrors() : mixed
getItems()
Retrieves a list of videos in an array
public
getItems(mixed $content[, mixed $returnObject = false ][, mixed $useRelative = false ]) : mixed
Parameters
- $content : mixed
- $returnObject : mixed = false
- $useRelative : mixed = false
Tags
getProviderEmbedCodes()
Processes an embedded video hyperlink with the appropriate embed codes.
public
getProviderEmbedCodes(mixed $link[, mixed $width = null ][, mixed $height = null ][, mixed $amp = false ]) : mixed
Parameters
- $link : mixed
- $width : mixed = null
- $height : mixed = null
- $amp : mixed = false
Tags
getVideoObjects()
Given a set of content, try to match and return the list of videos that are found in the content.
public
getVideoObjects(string $content) : array<string|int, mixed>
This is only applicable for videos that are supported by the library.
Parameters
- $content : string
-
The html contents that we should look for.
Tags
Return values
array<string|int, mixed> —An array of videos that are found.
hasError()
public
hasError() : mixed
hasErrors()
public
hasErrors() : mixed
isMobile()
Determines if this is a mobile layout
public
isMobile() : mixed
Tags
isTablet()
Determines if this is a tablet layout
public
isTablet() : mixed
Tags
loadLanguage()
Helper method to load language
public
loadLanguage([mixed $admin = false ]) : mixed
Parameters
- $admin : mixed = false
Tags
processAMP()
public
processAMP(mixed $content[, mixed $plain = false ][, mixed $useRelative = false ]) : mixed
Parameters
- $content : mixed
- $plain : mixed = false
- $useRelative : mixed = false
processExternalVideos()
Processes videos that are embedded on the post.
public
processExternalVideos(mixed $content[, mixed $isPlain = false ][, mixed $findText = '' ][, mixed $jsonString = '' ][, mixed $amp = false ]) : mixed
Parameters
- $content : mixed
- $isPlain : mixed = false
- $findText : mixed = ''
- $jsonString : mixed = ''
- $amp : mixed = false
Tags
processInstantVideos()
public
processInstantVideos(mixed $content) : mixed
Parameters
- $content : mixed
processUploadedVideos()
Search and replace videos that are uploaded to the site.
public
processUploadedVideos(mixed $content[, mixed $isPlain = false ][, mixed $findText = '' ][, mixed $result = '' ][, mixed $useRelative = null ]) : mixed
Parameters
- $content : mixed
- $isPlain : mixed = false
- $findText : mixed = ''
- $result : mixed = ''
- $useRelative : mixed = null
Tags
processVideoLink()
Retrieve the embed codes from specific video provider
public
processVideoLink(mixed $jsonString[, mixed $useRelative = false ]) : mixed
Parameters
- $jsonString : mixed
- $useRelative : mixed = false
Tags
processVideos()
Processes video codes and converts it accordingly.
public
processVideos(mixed $content[, mixed $isPlain = false ]) : mixed
Parameters
- $content : mixed
- $isPlain : mixed = false
Tags
setError()
public
setError(mixed $msg) : mixed
Parameters
- $msg : mixed
strip()
Removes any video codes from the content
public
strip(mixed $content) : mixed
Parameters
- $content : mixed
Tags
stripCodes()
Used in conjunction with EB::formatter()
public
stripCodes(EasyBlogPost &$post) : mixed
Parameters
- $post : EasyBlogPost