Public Member Functions | |
__construct (ResizedImageRepository $resizedImageRepository, ResourceType $sourceFileResourceType, $sourceFileDir, $sourceFileName, $requestedWidth, $requestedHeight, $forceRequestedSize=false) | |
getDirectory () | |
create () | |
getUrl () | |
requestedSizeIsValid () | |
Public Member Functions inherited from ResizedImageAbstract | |
__construct (ResourceType $sourceFileResourceType, string $sourceFileDir, string $sourceFileName, int $requestedWidth, int $requestedHeight) | |
getResourceType () | |
getFileName () | |
getFilePath () | |
getMimeType () | |
getTimestamp () | |
getSize () | |
getImageData () | |
setImageData ($imageData) | |
exists () | |
save () | |
load () | |
readStream () | |
create () | |
getDirectory () | |
Static Public Member Functions | |
static | createFilename ($fileName, $width, $height) |
static | getSizeFromFilename ($resizedImageFileName) |
Public Attributes | |
const | DIR = '__thumbs' |
Protected Attributes | |
$resizedImageRepository | |
$image | |
$width | |
$height | |
$requestedSizeIsValid = true | |
$sourceFileDir | |
Protected Attributes inherited from ResizedImageAbstract | |
$sourceFileResourceType | |
$backend | |
$sourceFileDir | |
$sourceFileName | |
$requestedWidth | |
$requestedHeight | |
$resizedImageFileName | |
$resizedImageData | |
$resizedImageSize | |
$resizedImageMimeType | |
$timestamp | |
ExtensionMimeTypeDetector | $mimeTypeDetector |
The resized image class.
A class representing an image that was resized to given dimensions.
__construct | ( | ResizedImageRepository | $resizedImageRepository, |
ResourceType | $sourceFileResourceType, | ||
$sourceFileDir, | |||
$sourceFileName, | |||
$requestedWidth, | |||
$requestedHeight, | |||
$forceRequestedSize = false |
|||
) |
ResizedImageRepository | $resizedImageRepository | Resized image repository object |
ResourceType | $sourceFileResourceType | Source image file resource type |
string | $sourceFileDir | Resource type relative directory path |
string | $sourceFileName | Source image filename |
int | $requestedWidth | Requested width |
int | $requestedHeight | Requested height |
bool | $forceRequestedSize | A flag telling if the requested size should be used, without calculating the aspect ratio |
Exception if the source image is invalid
create | ( | ) |
Creates a resized image.
Reimplemented from ResizedImageAbstract.
getDirectory | ( | ) |
getUrl | ( | ) |
Returns the direct URL to the resized image.
requestedSizeIsValid | ( | ) |
Checks if the size requested for the resized image is valid.
true
if the requested size is valid