OembedAdapterVk
extends OembedAdapter
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- beforeScrape() : mixed
- Triggered before the scraper scrapes any contents.
- fixOembedUrl() : mixed
- Fix the http url in https site
- 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
- 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
- process() : mixed
- scrape() : mixed
- By default, we let the scraper run its own course. If there are any oembed adapter that needs to run its own, they can override this method and implement on their own
- setContents() : mixed
- Allows caller to set the contents in the adapter
- setParser() : mixed
- Allows caller to set the parser in the adapter
- getVideoUrl() : mixed
- Generate the correct video url
- scrapex() : mixed
- Crawls the site to obtain the video contents
- generateVideoEmbed() : mixed
- Because vk.com does not have an API, we need to extract these data ourselves
- isWordpress() : mixed
- Determines if the target site is a wordpress site
Properties
$contents
public
mixed
$contents
= ''
$oembed
public
mixed
$oembed
= \null
$parser
public
mixed
$parser
= \null
$url
public
mixed
$url
= \null
Methods
__construct()
public
__construct(mixed $url) : mixed
Parameters
- $url : mixed
beforeScrape()
Triggered before the scraper scrapes any contents.
public
beforeScrape() : mixed
Tags
fixOembedUrl()
Fix the http url in https site
public
fixOembedUrl(mixed $oembed) : mixed
Parameters
- $oembed : mixed
Tags
getOembedData()
Retrieves the oembed data of a page
public
getOembedData() : mixed
Tags
getOembedUrl()
Determines if the current link supports oembed tags
public
getOembedUrl() : mixed
Tags
getOpengraphData()
Generates the opengraph data given the link to the video
public
getOpengraphData(mixed $contents) : mixed
Parameters
- $contents : mixed
Tags
isHandler()
Determines if the adapter is currently the handler for the given url
public
isHandler(mixed $url) : mixed
Parameters
- $url : mixed
Tags
isValid()
Tests to see if the url is a valid url for this adapter
public
isValid(mixed $url) : mixed
Parameters
- $url : mixed
Tags
process()
public
process(mixed &$result) : mixed
Parameters
- $result : mixed
scrape()
By default, we let the scraper run its own course. If there are any oembed adapter that needs to run its own, they can override this method and implement on their own
public
scrape() : mixed
Tags
setContents()
Allows caller to set the contents in the adapter
public
setContents(mixed $contents) : mixed
Parameters
- $contents : mixed
Tags
setParser()
Allows caller to set the parser in the adapter
public
setParser(mixed $parser) : mixed
Parameters
- $parser : mixed
Tags
getVideoUrl()
Generate the correct video url
protected
getVideoUrl() : mixed
Tags
scrapex()
Crawls the site to obtain the video contents
protected
scrapex(mixed $url) : mixed
Parameters
- $url : mixed
Tags
generateVideoEmbed()
Because vk.com does not have an API, we need to extract these data ourselves
private
generateVideoEmbed(mixed $video) : mixed
Parameters
- $video : mixed
Tags
isWordpress()
Determines if the target site is a wordpress site
private
isWordpress(mixed $url) : mixed
Parameters
- $url : mixed