TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AbstractImagePreset Class Reference
Inheritance diagram for AbstractImagePreset:
AbstractPreset PresetInterface GraphicsMagickPreset ImageMagick6Preset

Public Member Functions

 getFoundPath ()
 
 isActive ()
 
 isAvailable ()
 
 getConfigurationValues ()
 
- Public Member Functions inherited from AbstractPreset
 injectConfigurationManager (\TYPO3\CMS\Core\Configuration\ConfigurationManager $configurationManager)
 
 setPostValues (array $postValues)
 
 getIsAvailable ()
 
 isActive ()
 
 getIsActive ()
 
 getName ()
 
 getPriority ()
 
 getConfigurationValues ()
 

Protected Member Functions

 findExecutableInPath (array $searchPaths)
 
 getSearchPaths ()
 
 cleanUpPath ($path)
 

Protected Attributes

 $defaultExecutableSearchPaths
 
 $foundPath = ''
 
- Protected Attributes inherited from AbstractPreset
 $configurationManager = null
 
 $name = ''
 
 $priority = 50
 
 $configurationValues = array()
 
 $postValues = array()
 

Detailed Description

Abstract class implements common image preset code

Definition at line 22 of file AbstractImagePreset.php.

Member Function Documentation

cleanUpPath (   $path)
protected

Consolidate between Windows and Unix and add trailing slash im missing

Parameters
string$pathGiven path
Returns
string Cleaned up path

Definition at line 151 of file AbstractImagePreset.php.

Referenced by AbstractImagePreset\getSearchPaths().

findExecutableInPath ( array  $searchPaths)
abstractprotected

Find executable in path, wrapper for specific ImageMagick/GraphicsMagick find methods.

Parameters
array$searchPaths
Returns
mixed

Referenced by AbstractImagePreset\getConfigurationValues(), and AbstractImagePreset\isAvailable().

getConfigurationValues ( )

Get configuration values to activate prefix

Returns
array Configuration values needed to activate prefix

Implements PresetInterface.

Definition at line 93 of file AbstractImagePreset.php.

References AbstractPreset\$configurationValues, AbstractImagePreset\findExecutableInPath(), AbstractImagePreset\getFoundPath(), and AbstractImagePreset\getSearchPaths().

getFoundPath ( )

Path where executable was found

Returns
string Fonud path

Definition at line 49 of file AbstractImagePreset.php.

References AbstractImagePreset\$foundPath.

Referenced by AbstractImagePreset\getConfigurationValues().

getSearchPaths ( )
protected

Get list of paths to search for image handling executables

Returns
array List of pathes to search for

Definition at line 115 of file AbstractImagePreset.php.

References AbstractImagePreset\$defaultExecutableSearchPaths, $GLOBALS, and AbstractImagePreset\cleanUpPath().

Referenced by AbstractImagePreset\getConfigurationValues(), and AbstractImagePreset\isAvailable().

isActive ( )

Check is preset is currently active on the system. Overwrites parent method to ignore im_path and im_path_lzw settings

Returns
bool TRUE if preset is active

Implements PresetInterface.

Definition at line 60 of file AbstractImagePreset.php.

isAvailable ( )

Find out if GraphicsMagick is available

Returns
bool TRUE if GraphicsMagick executable is found in path

Implements PresetInterface.

Definition at line 82 of file AbstractImagePreset.php.

References AbstractImagePreset\findExecutableInPath(), and AbstractImagePreset\getSearchPaths().

Member Data Documentation

$defaultExecutableSearchPaths
protected
Initial value:
= array(
'/usr/local/bin/',
'/opt/local/bin/',
'/usr/bin/',
'/usr/X11R6/bin/',
'/opt/bin/',
'C:/php/ImageMagick/',
'C:/php/GraphicsMagick/',
'C:/apache/ImageMagick/',
'C:/apache/GraphicsMagick/',
)

Definition at line 27 of file AbstractImagePreset.php.

Referenced by AbstractImagePreset\getSearchPaths().

$foundPath = ''
protected

Definition at line 42 of file AbstractImagePreset.php.

Referenced by AbstractImagePreset\getFoundPath().