Class

Type

Abstract Package: Doctrine\DBAL\Types License: LGPL 2.1 Author: Roman Borschel roman@code-factory.org Version: PHPBoost 5.2 - last update: 2013 01 01 Since: PHPBoost 4.0 - 2013 01 01 Link: https://www.doctrine-project.org Located at: io/db/dbms/Doctrine/DBAL/Types/Type.php

The base class for so-called Doctrine mapping types. A Type object is obtained by calling the static Type::getType() method.

Methods summary
protected
public mixed
# convertToDatabaseValue( mixed $value, AbstractPlatform $platform )

Converts a value from its PHP representation to its database representation of this type.

public mixed
# convertToPHPValue( mixed $value, AbstractPlatform $platform )

Converts a value from its database representation to its PHP representation of this type.

public
# getDefaultLength( AbstractPlatform $platform )

Gets the default length of this type.

abstract public
# getSqlDeclaration( array $fieldDeclaration, AbstractPlatform $platform )

Gets the SQL declaration snippet for a field of this type.

abstract public string
# getName( )

Gets the name of this type.

public integer
# getTypeCode( )

Gets the type code of this type.

public static Doctrine\DBAL\Types\Type
# getType( string $name )

Factory method to create type instances. Type instances are implemented as flyweights.

public static
# addType( string $name, string $className )

Adds a custom type to the type map.

public static boolean
# hasType( string $name )

Checks if exists support for a type.

public static
# overrideType( string $name, string $className )

Overrides an already defined type to use a different implementation.

Constants summary
integer CODE_BOOL
# 5
integer CODE_NULL
# 0
integer CODE_INT
# 1
integer CODE_STR
# 2
integer CODE_LOB
# 3
Properties summary
protected static array $_typeObjects

Map of already instantiated type objects. One instance per type (flyweight).

# array()
Annonces