HumHub Documentation (unofficial)

UrlOembedHttpClient
in package
implements UrlOembedClient

Table of Contents

Interfaces

UrlOembedClient

Constants

ERROR_RESPONSES  = [self::RESPONSE_NOT_FOUND, self::RESPONSE_UNAUTHORIZED]
RESPONSE_NOT_FOUND  = 'Not Found'
RESPONSE_UNAUTHORIZED  = 'Unauthorized'

Methods

fetchUrl()  : array<string|int, mixed>|null
Fetches a given $url and returns the oembed result array. The resulting array should at least contain an `html` with a html preview and a `type` field.
parseJson()  : string|null

Constants

ERROR_RESPONSES

public mixed ERROR_RESPONSES = [self::RESPONSE_NOT_FOUND, self::RESPONSE_UNAUTHORIZED]

Methods

fetchUrl()

Fetches a given $url and returns the oembed result array. The resulting array should at least contain an `html` with a html preview and a `type` field.

public fetchUrl(mixed $url) : array<string|int, mixed>|null
Parameters
$url : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>|null

parseJson()

protected parseJson(mixed $json) : string|null
Parameters
$json : mixed
Return values
string|null

        
On this page

Search results