ResourceFetcher
class ResourceFetcher implements ResourceFetcherInterface (View source)
Fetches and caches oEmbed resources.
Properties
| protected Client | $httpClient | The HTTP client. |
|
| protected ProviderRepositoryInterface | $providers | The oEmbed provider repository service. |
|
| protected CacheBackendInterface | $cacheBackend | The cache backend. |
Methods
__construct(ClientInterface $http_client, ProviderRepositoryInterface $providers, CacheBackendInterface $cache_backend = NULL)
Constructs a ResourceFetcher object.
fetchResource(string $url)
Fetches an oEmbed resource.
createResource(array $data, string $url)
Creates a Resource object from raw resource data.
array
parseResourceXml(string $data, string $url)
Parses XML resource data.
Details
__construct(ClientInterface $http_client, ProviderRepositoryInterface $providers, CacheBackendInterface $cache_backend = NULL)
Constructs a ResourceFetcher object.
Resource
fetchResource(string $url)
Fetches an oEmbed resource.
protected Resource
createResource(array $data, string $url)
Creates a Resource object from raw resource data.
protected array
parseResourceXml(string $data, string $url)
Parses XML resource data.