ClassFactoryInterface
in
The interface that class factories must implement.
Table of Contents
Constants
- HANDLE_GD = 'gd'
- The handle to be used for the GD manipulation library.
- HANDLE_GMAGICK = 'gmagick'
- The handle to be used for the Gmagick manipulation library.
- HANDLE_IMAGICK = 'imagick'
- The handle to be used for the Imagick manipulation library.
Methods
- createBox() : BoxInterface
- Create new BoxInterface instance.
- createDrawer() : DrawerInterface
- Create a new DrawerInterface instance.
- createEffects() : EffectsInterface
- Create a new EffectsInterface instance.
- createFileLoader() : LoaderInterface
- Create a new instance of a file loader.
- createFont() : FontInterface
- Create new FontInterface instance.
- createImage() : ImageInterface
- Create a new ImageInterface instance.
- createLayers() : LayersInterface
- Crate a new instance of a layers interface.
- createMetadataReader() : MetadataReaderInterface
- Create a new instance of a metadata reader.
Constants
HANDLE_GD
The handle to be used for the GD manipulation library.
public
string
HANDLE_GD
= 'gd'
HANDLE_GMAGICK
The handle to be used for the Gmagick manipulation library.
public
string
HANDLE_GMAGICK
= 'gmagick'
HANDLE_IMAGICK
The handle to be used for the Imagick manipulation library.
public
string
HANDLE_IMAGICK
= 'imagick'
Methods
createBox()
Create new BoxInterface instance.
public
createBox(int $width, int $height) : BoxInterface
Parameters
- $width : int
-
The box width
- $height : int
-
The box height
Return values
BoxInterfacecreateDrawer()
Create a new DrawerInterface instance.
public
createDrawer(string $handle, mixed $resource) : DrawerInterface
Parameters
- $handle : string
-
The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
- $resource : mixed
Return values
DrawerInterfacecreateEffects()
Create a new EffectsInterface instance.
public
createEffects(string $handle, mixed $resource) : EffectsInterface
Parameters
- $handle : string
-
The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
- $resource : mixed
Return values
EffectsInterfacecreateFileLoader()
Create a new instance of a file loader.
public
createFileLoader(string|mixed $path) : LoaderInterface
Parameters
- $path : string|mixed
Return values
LoaderInterfacecreateFont()
Create new FontInterface instance.
public
createFont(string $handle, string $file, int $size, ColorInterface $color) : FontInterface
Parameters
- $handle : string
-
The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
- $file : string
- $size : int
-
the font size in points (e.g. 10pt means 10)
- $color : ColorInterface
Return values
FontInterfacecreateImage()
Create a new ImageInterface instance.
public
createImage(string $handle, mixed $resource, PaletteInterface $palette, MetadataBag $metadata) : ImageInterface
Parameters
- $handle : string
-
The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
- $resource : mixed
- $palette : PaletteInterface
- $metadata : MetadataBag
Return values
ImageInterfacecreateLayers()
Crate a new instance of a layers interface.
public
createLayers(string $handle, ImageInterface $image[, mixed|null $initialKey = null ]) : LayersInterface
Parameters
- $handle : string
-
The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
- $image : ImageInterface
- $initialKey : mixed|null = null
-
the key of the initially selected layer
Return values
LayersInterfacecreateMetadataReader()
Create a new instance of a metadata reader.
public
createMetadataReader() : MetadataReaderInterface