Fetch external images server side.
More...
Fetch external images server side.
Definition at line 18 of file ImageFetcherService.php.
◆ __construct()
Constructor.
- Parameters
-
| Config | $config | config |
| SystemCache | $cache | the system cache |
| \ElggSession | $session | the current session |
Definition at line 34 of file ImageFetcherService.php.
◆ getImage()
| Elgg\Assets\ImageFetcherService::getImage |
( |
string |
$image_url | ) |
|
Get an image.
- Parameters
-
| string | $image_url | the image url to get |
- Exceptions
-
Definition at line 54 of file ImageFetcherService.php.
◆ makeCacheKey()
| Elgg\Assets\ImageFetcherService::makeCacheKey |
( |
string |
$image_url | ) |
|
|
protected |
Get the cache key for a given url.
- Parameters
-
| string | $image_url | the image url |
- Returns
- string
Definition at line 122 of file ImageFetcherService.php.
◆ validateImageData()
| Elgg\Assets\ImageFetcherService::validateImageData |
( |
string |
$image_data | ) |
|
|
protected |
Validate that the fetched image data is an actual image.
- Parameters
-
| string | $image_data | image fetch result |
- Returns
- bool
Definition at line 133 of file ImageFetcherService.php.
◆ $client
| Elgg\Assets\ImageFetcherService::$client |
|
protected |
◆ CACHE_PREFIX
| const Elgg\Assets\ImageFetcherService::CACHE_PREFIX = 'image_fetcher_' |
|
protected |
The documentation for this class was generated from the following file: