\Charcoal\FactoryFactoryInterface

Factories instanciate (create) objects.

Summary

Methods
Constants
create()
baseClass()
defaultClass()
arguments()
callback()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

create()

create(string  $type, array  $args = null, callable  $cb = null) : mixed

Create a new instance of a class, by type.

Parameters

string $type

The type (class ident).

array $args

Constructor arguments.

callable $cb

Object callback.

Returns

mixed —

The instance / object

baseClass()

baseClass() : string

A base class name (or interface)

Returns

string

defaultClass()

defaultClass() : string

Returns

string

arguments()

arguments() : array

Returns

array

callback()

callback() : callable|null

Returns

callable|null