Documentation

DefaultEmbedProvider
in package
implements EmbedProvider

Default EmbedProvider using Embed\Embed if it exists.

If the Embed\Embed library is not installed, it will always return null for embed codes, and the parser will use the fallback strategy.

Table of Contents

Interfaces

EmbedProvider
Interface for classes that can provide embed HTML for a given URL.

Properties

$internal  : Embed|null
Internal copy of the Embed library.

Methods

__construct()  : mixed
Construct the provider.
getEmbedCodeFor()  : string|null
Get the HTML embed code for the given URL.

Properties

Methods

getEmbedCodeFor()

Get the HTML embed code for the given URL.

public getEmbedCodeFor(string $url) : string|null
Parameters
$url : string

URL to embed.

Return values
string|null

HTML code to embed the URL or null if not found.


        
On this page

Search results