This class embodies an Embed fragment.
§ __construct()
| Prismic\Fragment\Embed::__construct |
( |
|
$type, |
|
|
|
$provider, |
|
|
|
$url, |
|
|
|
$maybeWidth, |
|
|
|
$maybeHeigth, |
|
|
|
$maybeHtml, |
|
|
|
$oembedJson |
|
) |
| |
Constructs an Embed fragment.
- Parameters
-
| string | $type | the OEmbed resource's type |
| string | $provider | the OEmbed resource's provider |
| string | $url | the OEmbed resource's URL |
| string | $maybeWidth | the OEmbed resource's width |
| string | $maybeHeigth | the OEmbed resource's height |
| string | $maybeHtml | the OEmbed resource's HTML |
| string | $oembedJson | the OEmbed resource's JSON |
§ asHtml()
| Prismic\Fragment\Embed::asHtml |
( |
|
$linkResolver = null | ) |
|
§ asText()
| Prismic\Fragment\Embed::asText |
( |
| ) |
|
§ getHeight()
| Prismic\Fragment\Embed::getHeight |
( |
| ) |
|
Get the the OEmbed height
- Returns
- string
§ getOEmbedJson()
| Prismic\Fragment\Embed::getOEmbedJson |
( |
| ) |
|
Get the the OEmbed resource's JSON.
- Returns
§ getProvider()
| Prismic\Fragment\Embed::getProvider |
( |
| ) |
|
Get the the OEmbed provider
- Returns
- string
§ getType()
| Prismic\Fragment\Embed::getType |
( |
| ) |
|
Get the the OEmbed type
- Returns
- string
§ getUrl()
| Prismic\Fragment\Embed::getUrl |
( |
| ) |
|
Get the the OEmbed url
- Returns
- string
§ getWidth()
| Prismic\Fragment\Embed::getWidth |
( |
| ) |
|
Get the the OEmbed width
- Returns
- string
§ parse()
| static Prismic\Fragment\Embed::parse |
( |
|
$json | ) |
|
|
static |
Parses a given Embed fragment. Not meant to be used except for testing.
- Parameters
-
| \stdClass | $json | the json bit retrieved from the API that represents an Embed fragment. |
- Returns
- the manipulable object for that Embed fragment.
The documentation for this class was generated from the following file:
- src/Prismic/Fragment/Embed.php