RemoteImageCache
in package
Table of Contents
Properties
- $framework : ContaoFrameworkInterface
- $container : ContainerInterface
Methods
- __construct() : mixed
- get() : bool|string
- Get a remote file from cache and cache file, if not already in cache.
Properties
$framework
protected
ContaoFrameworkInterface
$framework
$container
private
ContainerInterface
$container
Methods
__construct()
public
__construct(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
get()
Get a remote file from cache and cache file, if not already in cache.
public
get(string $identifier, string $folder, string $remoteUrl[, bool $returnUuid = false ]) : bool|string
Returns false, if remote file could not be fetched or given uuid is not valid. Else returns the url or, if $returnUuid is set true, the uuid of the image.
Parameters
- $identifier : string
-
Used as filename of the cached image. Should be unique within the folder scope
- $folder : string
-
Folder path or uuid of the file
- $remoteUrl : string
-
The url of the cached (or to cache) file
- $returnUuid : bool = false
-
Return uuid instead of the path