interface ClassFactoryInterface

The interface that class factories must implement.

Constants

HANDLE_GD

The handle to be used for the GD manipulation library.

HANDLE_GMAGICK

The handle to be used for the Gmagick manipulation library.

HANDLE_IMAGICK

The handle to be used for the Imagick manipulation library.

Methods

createMetadataReader()

Create a new instance of a metadata reader.

createBox(int $width, int $height)

Create new BoxInterface instance.

createFont(string $handle, string $file, int $size, ColorInterface $color)

Create new FontInterface instance.

createFileLoader(string|mixed $path)

Create a new instance of a file loader.

createLayers(string $handle, ImageInterface $image, mixed|null $initialKey = null)

Crate a new instance of a layers interface.

createImage(string $handle, mixed $resource, PaletteInterface $palette, MetadataBag $metadata)

Create a new ImageInterface instance.

createDrawer(string $handle, mixed $resource)

Create a new DrawerInterface instance.

createEffects(string $handle, mixed $resource)

Create a new EffectsInterface instance.

Details

at line 38
MetadataReaderInterface createMetadataReader()

Create a new instance of a metadata reader.

at line 48
BoxInterface createBox(int $width, int $height)

Create new BoxInterface instance.

Parameters

int $width The box width
int $height The box height

Return Value

BoxInterface

at line 60
FontInterface createFont(string $handle, string $file, int $size, ColorInterface $color)

Create new FontInterface instance.

Parameters

string $handle The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
string $file
int $size the font size in points (e.g. 10pt means 10)
ColorInterface $color

Return Value

FontInterface

at line 69
LoaderInterface createFileLoader(string|mixed $path)

Create a new instance of a file loader.

Parameters

string|mixed $path

Return Value

LoaderInterface

at line 80
LayersInterface createLayers(string $handle, ImageInterface $image, mixed|null $initialKey = null)

Crate a new instance of a layers interface.

Parameters

string $handle The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
ImageInterface $image
mixed|null $initialKey the key of the initially selected layer

Return Value

LayersInterface

at line 92
ImageInterface createImage(string $handle, mixed $resource, PaletteInterface $palette, MetadataBag $metadata)

Create a new ImageInterface instance.

Parameters

string $handle The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
mixed $resource
PaletteInterface $palette
MetadataBag $metadata

Return Value

ImageInterface

at line 102
DrawerInterface createDrawer(string $handle, mixed $resource)

Create a new DrawerInterface instance.

Parameters

string $handle The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
mixed $resource

Return Value

DrawerInterface

at line 112
EffectsInterface createEffects(string $handle, mixed $resource)

Create a new EffectsInterface instance.

Parameters

string $handle The handle that identifies the manipulation library (one of the HANDLE_... constants, or your own implementation).
mixed $resource

Return Value

EffectsInterface