Documentation

OembedAdapterYoutube extends OembedAdapter
in package

Table of Contents

Properties

$contents  : mixed
$oembed  : mixed
$parser  : mixed
$url  : mixed

Methods

__construct()  : mixed
beforeScrape()  : mixed
Triggered before the scraper scrapes any contents.
fixOembedUrl()  : mixed
Fix the http url in https site
getDuration()  : mixed
Convert video duration from ISO 8601 format to seconds.
getOembed()  : mixed
Handler our own way of extracting oembed data
getOembedData()  : mixed
Retrieves the oembed data of a page
getOembedUrl()  : mixed
Determines if the current link supports oembed tags
getOpengraphData()  : mixed
Generates the opengraph data given the link to the video
getThumbnail()  : mixed
Get video thumbnails
getVideoId()  : mixed
Normalize the youTube video id
isHandler()  : mixed
Determines if the adapter is currently the handler for the given url
isValid()  : mixed
Tests to see if the url is a valid url for this adapter
scrape()  : mixed
Override the parent's behavior as we do not want to scrape video pages as the ip could be banned
setContents()  : mixed
Allows caller to set the contents in the adapter
setParser()  : mixed
Allows caller to set the parser in the adapter
simulateOembedData()  : mixed
Simulate oembed data
isLiveUrl()  : mixed
Determines if the current url is a live youtube feed
isWordpress()  : mixed
Determines if the target site is a wordpress site

Properties

$contents

public mixed $contents = ''

$oembed

public mixed $oembed = \false

$parser

public mixed $parser = \null

Methods

__construct()

public __construct(mixed $url) : mixed
Parameters
$url : mixed

beforeScrape()

Triggered before the scraper scrapes any contents.

public beforeScrape() : mixed
Tags
since
1.0.0
access

public

fixOembedUrl()

Fix the http url in https site

public fixOembedUrl(mixed $oembed) : mixed
Parameters
$oembed : mixed
Tags
since
1.0.0
access

public

getDuration()

Convert video duration from ISO 8601 format to seconds.

public getDuration() : mixed
Tags
since
2.0
access

public

getOembed()

Handler our own way of extracting oembed data

public getOembed() : mixed
Tags
since
1.0.0
access

public

getOembedData()

Retrieves the oembed data of a page

public getOembedData() : mixed
Tags
since
1.0.0
access

public

getOembedUrl()

Determines if the current link supports oembed tags

public getOembedUrl() : mixed
Tags
since
1.0.0
access

public

getOpengraphData()

Generates the opengraph data given the link to the video

public getOpengraphData(mixed $contents) : mixed
Parameters
$contents : mixed
Tags
since
2.1.0
access

public

getThumbnail()

Get video thumbnails

public getThumbnail() : mixed
Tags
since
1.0.0
access

public

getVideoId()

Normalize the youTube video id

public getVideoId() : mixed
Tags
since
3.2.18
access

public

isHandler()

Determines if the adapter is currently the handler for the given url

public isHandler(mixed $url) : mixed
Parameters
$url : mixed
Tags
since
1.0.0
access

public

isValid()

Tests to see if the url is a valid url for this adapter

public isValid(mixed $url) : mixed
Parameters
$url : mixed
Tags
since
1.0.0
access

public

scrape()

Override the parent's behavior as we do not want to scrape video pages as the ip could be banned

public scrape() : mixed
Tags
since
1.0.0
access

public

setContents()

Allows caller to set the contents in the adapter

public setContents(mixed $contents) : mixed
Parameters
$contents : mixed
Tags
since
1.0.0
access

public

setParser()

Allows caller to set the parser in the adapter

public setParser(mixed $parser) : mixed
Parameters
$parser : mixed
Tags
since
1.0.0
access

public

simulateOembedData()

Simulate oembed data

public simulateOembedData(mixed $data) : mixed
Parameters
$data : mixed
Tags
since
1.0.0
access

public

isLiveUrl()

Determines if the current url is a live youtube feed

private isLiveUrl() : mixed
Tags
since
1.0.0
access

private

isWordpress()

Determines if the target site is a wordpress site

private isWordpress(mixed $url) : mixed
Parameters
$url : mixed
Tags
since
1.0.0
access

public


        
On this page

Search results