Class humhub\libs\UrlOembedHttpClient

Inheritancehumhub\libs\UrlOembedHttpClient
Implementshumhub\libs\UrlOembedClient

Public Methods

Hide inherited methods

MethodDescriptionDefined By
fetchUrl() Fetches a given $url and returns the oembed result array. humhub\libs\UrlOembedHttpClient

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
parseJson() humhub\libs\UrlOembedHttpClient

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
ERROR_RESPONSES array(self::RESPONSE_NOT_FOUND, self::RESPONSE_UNAUTHORIZED) humhub\libs\UrlOembedHttpClient
RESPONSE_NOT_FOUND 'Not Found' humhub\libs\UrlOembedHttpClient
RESPONSE_UNAUTHORIZED 'Unauthorized' humhub\libs\UrlOembedHttpClient

Method Details

fetchUrl() public method

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 array|null fetchUrl ( $url )
$url string
parseJson() protected method

protected string|null parseJson ( $json )
$json