/** * Returns the path to an image which has been cached in a particular width, height and mode. * * @param UploadedFile $image The image * @param integer $width The width * @param integer $height The height * @param string $mode The mode * * @return string */ public function getImageCacheFilename(UploadedFile $image, $width, $height, $mode) { $outputFile = $this->getImageCacheDirectory(); $outputFile .= "/" . sha1($image->getFilename()); $outputFile .= $width . "x" . $height . "_" . $mode . ".png"; return $outputFile; }
/** * Returns the path to an image which has been cached in a particular width, height and mode. * * @param UploadedFile $image The image * @param int $width The width * @param int $height The height * @param string $mode The mode * * @return string */ public function getImageCacheFilename(UploadedFile $image, $width, $height, $mode) { $outputFile = $this->getImageCacheDirectory(); $outputFile .= '/' . sha1($image->getFilename()); $outputFile .= $width . 'x' . $height . '_' . $mode . '.png'; return $outputFile; }