PHP Class Essence\Provider

Inheritance: use trait Essence\Configurable
Datei anzeigen Open project: benjamminf/craft-embedded-assets Class Usage Examples

Protected Properties

Property Type Description
$_preparators array Preparators.
$_presenters array Presenters.
$_properties array Configuration options.

Public Methods

Method Description
extract ( string $url, array $options = [] ) : Media Extracts information from the given URL.
setPreparators ( array $preparators ) Sets preparators.
setPresenters ( array $presenters ) Sets presenters.

Protected Methods

Method Description
_extract ( string $url, array $options ) : Media Does the actual fetching of informations.

Private Methods

Method Description
filter ( mixed $value, array $filters ) : mixed Filters a value through a set of functions.

Method Details

_extract() abstract protected method

Does the actual fetching of informations.
abstract protected _extract ( string $url, array $options ) : Media
$url string URL to fetch informations from.
$options array Custom options to be interpreted by the provider.
return Media Embed informations.

extract() final public method

Extracts information from the given URL.
final public extract ( string $url, array $options = [] ) : Media
$url string URL to fetch informations from.
$options array Custom options to be interpreted by the provider.
return Media Embed informations.

setPreparators() public method

Sets preparators.
public setPreparators ( array $preparators )
$preparators array Preparators.

setPresenters() public method

Sets presenters.
public setPresenters ( array $presenters )
$presenters array Presenters.

Property Details

$_preparators protected_oe property

Preparators.
protected array $_preparators
return array

$_presenters protected_oe property

Presenters.
protected array $_presenters
return array

$_properties protected_oe property

Configuration options.
protected array $_properties
return array