PHP 클래스 Doctrine\OXM\Types\Type

A Type object is obtained by calling the static {@link getType()} method.
부터: 2.0
저자: Richard Fullmer ([email protected])
파일 보기 프로젝트 열기: doctrine/oxm 1 사용 예제들

공개 메소드들

메소드 설명
__toString ( )
addType ( string $name, string $className ) Adds a custom type to the type map.
convertToPHPValue ( mixed $value ) : mixed Converts a value from its database representation to its PHP representation of this type.
convertToXmlValue ( mixed $value ) : mixed Converts a value from its PHP representation to its XML representation of this type.
getName ( ) : string Gets the name of this type.
getType ( string $name ) : Type Factory method to create type instances.
getTypesMap ( ) : array Get the types array map which holds all registered types and the corresponding type class
hasType ( string $name ) : boolean Checks if exists support for a type.
overrideType ( string $name, string $className ) Overrides an already defined type to use a different implementation.

비공개 메소드들

메소드 설명
__construct ( ) * Prevent instantiation and force use of the factory method.

메소드 상세

__toString() 공개 메소드

public __toString ( )

addType() 공개 정적인 메소드

Adds a custom type to the type map.
public static addType ( string $name, string $className )
$name string Name of the type. This should correspond to what getName() returns.
$className string The class name of the custom type.

convertToPHPValue() 공개 메소드

Converts a value from its database representation to its PHP representation of this type.
public convertToPHPValue ( mixed $value ) : mixed
$value mixed The value to convert.
리턴 mixed The PHP representation of the value.

convertToXmlValue() 공개 메소드

Converts a value from its PHP representation to its XML representation of this type.
public convertToXmlValue ( mixed $value ) : mixed
$value mixed The value to convert.
리턴 mixed The XML representation of the value.

getName() 추상적인 공개 메소드

Gets the name of this type.
abstract public getName ( ) : string
리턴 string

getType() 공개 정적인 메소드

Type instances are implemented as flyweights.
public static getType ( string $name ) : Type
$name string The name of the type (as returned by getName()).
리턴 Type

getTypesMap() 공개 정적인 메소드

Get the types array map which holds all registered types and the corresponding type class
public static getTypesMap ( ) : array
리턴 array $typesMap

hasType() 공개 정적인 메소드

Checks if exists support for a type.
public static hasType ( string $name ) : boolean
$name string Name of the type
리턴 boolean TRUE if type is supported; FALSE otherwise

overrideType() 공개 정적인 메소드

Overrides an already defined type to use a different implementation.
public static overrideType ( string $name, string $className )
$name string
$className string