Fetch external images server side.
More...
Fetch external images server side.
Definition at line 17 of file ImageFetcherService.php.
◆ __construct()
Constructor.
- Parameters
-
| Config | $config | config |
| SystemCache | $cache | the system cache |
| \ElggSession | $session | the current session |
Definition at line 33 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 53 of file ImageFetcherService.php.
◆ loadFromCache()
| Elgg\Assets\ImageFetcherService::loadFromCache |
( |
string |
$image_url | ) |
|
|
protected |
Load an image url from cache.
- Parameters
-
| string | $image_url | the url to load |
- Returns
- array
Definition at line 112 of file ImageFetcherService.php.
◆ saveToCache()
| Elgg\Assets\ImageFetcherService::saveToCache |
( |
string |
$image_url, |
|
|
array |
$data |
|
) |
| |
|
protected |
Save image data in system cache for easy reuse.
- Parameters
-
| string | $image_url | the image url |
| array | $data | the image data |
- Returns
- bool
Definition at line 126 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: