OEmbed final class
Minn\Runtime\OEmbed · public/minn/src/Minn/Runtime/OEmbed.php · 114 lines
oEmbed as data: provider matching against the wildcard table, response parsing, and the markup an oEmbed payload becomes.
Uses 1
Public
| static | providerFor(array $providers, string $url): ?string# | The endpoint of the provider whose mask matches a URL, or null.
| ||||||
| static | parseJson(string $body): ?array# | An oEmbed JSON body as an array, or null. @return array<string, mixed>|null | ||||||
| static | parseXml(string $body): ?array# | An oEmbed XML body as an array, or null. @return array<string, mixed>|null | ||||||
| static | html(array $data, string $url, Closure $escUrl, Closure $escAttr, Closure $escHtml): ?string# | The embed HTML for an oEmbed response, or null.
| ||||||
| static | discovered(string $html, array $linktypes): ?string# | The provider endpoint a page names in its head: the first link of each oEmbed type (the linktypes map type to json or xml), JSON before XML, its address entity-decoded. Null when it names none.
| ||||||
| static | stripNewlines(string $html): string# | Drops newlines from embed markup while leaving the inside of <pre> blocks untouched. |
Nothing matches.