mediatekformation

TypeRegistry
in package

The type registry is responsible for holding a map of all known DBAL types.

The types are stored using the flyweight pattern so that one type only exists as exactly one instance.

Table of Contents

$instances  : array<string, Type>
__construct()  : mixed
get()  : Type
Finds a type by the given name.
has()  : bool
Checks if there is a type of the given name.
lookupName()  : string
Finds a name for the given type.
override()  : void
Overrides an already defined type to use a different implementation.
register()  : void
Registers a custom type to the type map.
findTypeName()  : string|null

Properties

$instances

private array<string, Type> $instances

Map of type names and their corresponding flyweight objects.

Methods

__construct()

public __construct([array<string, Type$instances = [] ]) : mixed
Parameters
$instances : array<string, Type> = []
Return values
mixed

get()

Finds a type by the given name.

public get(string $name) : Type
Parameters
$name : string
Tags
throws
Exception
Return values
Type

has()

Checks if there is a type of the given name.

public has(string $name) : bool
Parameters
$name : string
Return values
bool

lookupName()

Finds a name for the given type.

public lookupName(Type $type) : string
Parameters
$type : Type
Tags
throws
Exception
Return values
string

override()

Overrides an already defined type to use a different implementation.

public override(string $name, Type $type) : void
Parameters
$name : string
$type : Type
Tags
throws
Exception
Return values
void

register()

Registers a custom type to the type map.

public register(string $name, Type $type) : void
Parameters
$name : string
$type : Type
Tags
throws
Exception
Return values
void

findTypeName()

private findTypeName(Type $type) : string|null
Parameters
$type : Type
Return values
string|null

Search results