DIR
DIR = __DIR__
Grafika root directory
Contains factory methods for detecting editors, creating editors and images.
detectAvailableEditor(array $editorList = null) : string
Detects and return the name of the first supported editor which can either be "Imagick" or "Gd".
array | $editorList | Array of editor list names. Use this to change the order of evaluation for editors for this function call only. Default order of evaluation is Imagick then GD. |
Throws exception if there are no supported editors.
Name of available editor.
createEditor(array $editorList = array('Imagick', 'Gd')) : \Grafika\EditorInterface
Creates the first available editor.
array | $editorList | Array of editor list names. Use this to change the order of evaluation for editors. Default order of evaluation is Imagick then GD. |
createImage(string $imageFile) : \Grafika\ImageInterface
Create an image.
string | $imageFile | Path to image file. |
createBlankImage(integer $width = 1, integer $height = 1) : \Grafika\ImageInterface
Create a blank image.
integer | $width | Width of image in pixels. |
integer | $height | Height of image in pixels. |
createFilter(string $filterName) : \Grafika\FilterInterface
Create a filter. Detects available editor to use.
string | $filterName | The name of the filter. |
createDrawingObject(string $drawingObjectName) : \Grafika\DrawingObjectInterface
Draws an object. Detects available editor to use.
string | $drawingObjectName | The name of the DrawingObject. |
We use array_key_exist() instead of isset() to be able to detect a parameter with a NULL value.