PHP Class Essence\Extractor

Mostrar archivo Open project: benjamminf/craft-embedded-assets Class Usage Examples

Protected Properties

Property Type Description
$_Collection Essence\Provider\Collection A collection of providers.

Public Methods

Method Description
__construct ( Collection $Collection ) Constructor.
extract ( string $url, array $options = [] ) : Essence\Media Fetches informations about the given URL.
extractAll ( array $urls, array $options = [] ) : array Fetches informations about the given URLs.

Method Details

__construct() public method

Constructor.
public __construct ( Collection $Collection )
$Collection Essence\Provider\Collection Providers collection.

extract() public method

Fetches informations about the given URL.
public extract ( string $url, array $options = [] ) : Essence\Media
$url string URL to fetch informations from.
$options array Custom options to be interpreted by a provider.
return Essence\Media Embed informations.

extractAll() public method

Fetches informations about the given URLs.
public extractAll ( array $urls, array $options = [] ) : array
$urls array An array of URLs to fetch informations from.
$options array Custom options to be interpreted by a provider.
return array An array of informations, indexed by URL.

Property Details

$_Collection protected_oe property

A collection of providers.
protected Collection,Essence\Provider $_Collection
return Essence\Provider\Collection