phpDocumentor

LegacyProductImageProcessing
in package
implements ProductImageProcessingInterface

Class LegacyProductImageProcessing

Tags
category

System

subpackage

Entities

Interfaces, Classes and Traits

ProductImageProcessingInterface
Interface ProductImageProcessingInterface

Table of Contents

proceedImage()  : LegacyProductImageProcessing
Proceed Image
_defineNeededConstantsForIncludes()  : mixed
Define Needed Constants for Includes
_isGdLibraryInstalled()  : bool
Is GD Library Installed
_throwExceptionIfImageDoesNotExist()  : mixed
Throw Exception If Image Does Not Exist

Methods

proceedImage()

Proceed Image

public proceedImage(FilenameStringType $image) : LegacyProductImageProcessing

Processes an image for the front end.

Parameters
$image : FilenameStringType

Image to proceed.

Tags
throws
FileNotFoundException

if the provided image was not found.

throws
RuntimeException

if the PHP GD library is not installed.

throws
InvalidArgumentException

if the provided image name is not valid.

Return values
LegacyProductImageProcessing

Same instance for chained method calls.

_defineNeededConstantsForIncludes()

Define Needed Constants for Includes

protected _defineNeededConstantsForIncludes() : mixed

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.

Return values
mixed

_isGdLibraryInstalled()

Is GD Library Installed

protected _isGdLibraryInstalled() : bool

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

Return values
bool

Is the PHP GD library installed?

_throwExceptionIfImageDoesNotExist()

Throw Exception If Image Does Not Exist

protected _throwExceptionIfImageDoesNotExist( $image) : mixed

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

Parameters
$image :

Image to check.

Tags
throws
FileNotFoundException

if the image was not found.

Return values
mixed

Search results