Scraper
in package
Table of Contents
Properties
Methods
- __construct() : mixed
- getContentType() : mixed
- Determines the type of the response from the header
- getOembedAdapter() : mixed
- Create an instance of the scraper adapter
- getOembedAdapterForUrl() : mixed
- Create an instance of the scraper adapter
- getOembedAdapters() : mixed
- Initialize adapters available for the scraper
- getPlugin() : mixed
- Creates a new plugin instance
- isHtmlDocument() : mixed
- Determines if the response header determines if this is a html document
- isImage() : mixed
- Determines if the response header determines if this is a html document
- normalizeContent() : mixed
- Normalizes the output of a url
- normalizeResult() : mixed
- Normalizes the result object to ensure that all our data is standardized
- normalizeUrl() : mixed
- Normalizes the url and ensure that it is a valid url
- rescrape() : mixed
- Rescrapes a url
- scrape() : mixed
- Scrapes url and retrieves the content from the particular page
- extractContentType() : mixed
- Extract the content type from the header
Properties
$contents
private
mixed
$contents
= null
$hooks
private
mixed
$hooks
= []
$oembeds
private
mixed
$oembeds
= []
$plugins
private
mixed
$plugins
= ['title', 'description', 'keywords', 'opengraph', 'images']
$url
private
mixed
$url
= ''
Methods
__construct()
public
__construct(mixed $url) : mixed
Parameters
- $url : mixed
getContentType()
Determines the type of the response from the header
public
getContentType(mixed $header) : mixed
Parameters
- $header : mixed
Tags
getOembedAdapter()
Create an instance of the scraper adapter
public
getOembedAdapter(mixed $type) : mixed
Parameters
- $type : mixed
Tags
getOembedAdapterForUrl()
Create an instance of the scraper adapter
public
getOembedAdapterForUrl(mixed $url) : mixed
Parameters
- $url : mixed
Tags
getOembedAdapters()
Initialize adapters available for the scraper
public
getOembedAdapters() : mixed
Tags
getPlugin()
Creates a new plugin instance
public
getPlugin(mixed $plugin, mixed $parser, mixed $contents) : mixed
Parameters
- $plugin : mixed
- $parser : mixed
- $contents : mixed
Tags
isHtmlDocument()
Determines if the response header determines if this is a html document
public
isHtmlDocument(mixed $headers) : mixed
Parameters
- $headers : mixed
Tags
isImage()
Determines if the response header determines if this is a html document
public
isImage(mixed $headers) : mixed
Parameters
- $headers : mixed
Tags
normalizeContent()
Normalizes the output of a url
public
normalizeContent(mixed $url, mixed $content) : mixed
Parameters
- $url : mixed
- $content : mixed
Tags
normalizeResult()
Normalizes the result object to ensure that all our data is standardized
public
normalizeResult(mixed &$result) : mixed
Parameters
- $result : mixed
Tags
normalizeUrl()
Normalizes the url and ensure that it is a valid url
public
normalizeUrl(mixed $url) : mixed
Parameters
- $url : mixed
Tags
rescrape()
Rescrapes a url
public
rescrape(mixed $url) : mixed
Parameters
- $url : mixed
Tags
scrape()
Scrapes url and retrieves the content from the particular page
public
scrape() : mixed
Tags
extractContentType()
Extract the content type from the header
private
extractContentType(mixed $headers) : mixed
Parameters
- $headers : mixed