class ClassFactory implements ClassFactoryInterface

The default implementation of Imagine\Factory\ClassFactoryInterface.

Methods

createMetadataReader()

Create a new instance of a metadata reader.

createBox(int $width, int $height)

Create new BoxInterface instance.

createFileLoader(string|mixed $path)

Create a new instance of a file loader.

createDrawer(string $handle, mixed $resource)

Create a new DrawerInterface instance.

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

Crate a new instance of a layers interface.

createEffects(string $handle, mixed $resource)

Create a new EffectsInterface instance.

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

Create a new ImageInterface instance.

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

Create new FontInterface instance.

object
finalize(object $object)

Finalize the newly created object.

static array
getGDInfo()

No description

Details

at line 31
MetadataReaderInterface createMetadataReader()

Create a new instance of a metadata reader.

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

Create new BoxInterface instance.

Parameters

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

Return Value

BoxInterface

See also

ClassFactoryInterface::createBox

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

Create a new instance of a file loader.

Parameters

string|mixed $path

Return Value

LoaderInterface

See also

ClassFactoryInterface::createFileLoader

at line 61
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

See also

ClassFactoryInterface::createDrawer

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

See also

ClassFactoryInterface::createLayers

at line 99
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

See also

ClassFactoryInterface::createEffects

at line 118
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

See also

ClassFactoryInterface::createImage

at line 137
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

See also

ClassFactoryInterface::createFont

at line 166
protected object finalize(object $object)

Finalize the newly created object.

Parameters

object $object

Return Value

object

at line 178
static protected array getGDInfo()

Return Value

array