LegacyProductImageProcessing

Implements \ProductImageProcessingInterface

Class LegacyProductImageProcessing

category

System

package

Product

subpackage

Entities

Methods

Define Needed Constants for Includes

_defineNeededConstantsForIncludes() 

These constants are needed for the include files. The global constants defined in admin/includes/configure.php are not available, because the current file is within in the src/includes folder and thus, is using the src/includes/configure.php, in which those constants are either not defined or not correct for this class.

Is GD Library Installed

_isGdLibraryInstalled() : boolean

Checks if the GD library is installed, which is necessary for the image processing. Returns true if the library is installed.

Response

boolean

Is the PHP GD library installed?

Throw Exception If Image Does Not Exist

_throwExceptionIfImageDoesNotExist( $image) 

Checks if the image exist in the folder original_images. If the image does not exist, an exception will be thrown.

Throws
\FileNotFoundException

if the image was not found.

Arguments

$image

Image to check.

Proceed Image

proceedImage(\FilenameStringType $image) : \LegacyProductImageProcessing

Processes an image for the front end.

Throws
\FileNotFoundException

if the provided image was not found.

\RuntimeException

if the PHP GD library is not installed.

\InvalidArgumentException

if the provided image name is not valid.

Arguments

$image

\FilenameStringType

Image to proceed.

Response

\LegacyProductImageProcessing

Same instance for chained method calls.