public function __construct(array $params)
{
if (!isset($params['path'])) {
throw new InvalidArgumentException('The image transformation cache path is missing from the configuration', 500);
}
$path = $params['path'];
if (!$this->isWritable($path)) {
throw new InvalidArgumentException('Image transformation cache path is not writable by the webserver: ' . $path, 500);
}
$this->path = $path;
}