PHP 클래스 Prado\Data\SqlMap\DataMapper\TSqlMapTypeHandler

Using this interface, you can implement a type handler that will perform customized processing before parameters are set on and after values are retrieved from the database. Using a custom type handler you can extend the framework to handle types that are not supported, or handle supported types in a different way. For example, you might use a custom type handler to implement proprietary BLOB support (e.g. Oracle), or you might use it to handle booleans using "Y" and "N" instead of the more typical 0/1.
부터: 3.1
상속: extends Prado\TComponent
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
createNewInstance ( $row = null ) : mixed Casts the string representation of a value into a type recognized by this type handler. This method is used to translate nullValue values into types that can be appropriately compared. If your custom type handler cannot support nullValues, or if there is no reasonable string representation for this type (e.g. File type), you can simply return the String representation as it was passed in. It is not recommended to return null, unless null was passed in.
getDbType ( ) : string
getParameter ( $object ) Performs processing on a value before it is used to set the parameter of a IDbCommand.
getResult ( $string ) : mixed Performs processing on a value before after it has been retrieved from a database
getType ( )
setDbType ( $value )
setType ( $value )

메소드 상세

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

Casts the string representation of a value into a type recognized by this type handler. This method is used to translate nullValue values into types that can be appropriately compared. If your custom type handler cannot support nullValues, or if there is no reasonable string representation for this type (e.g. File type), you can simply return the String representation as it was passed in. It is not recommended to return null, unless null was passed in.
abstract public createNewInstance ( $row = null ) : mixed
리턴 mixed

getDbType() 공개 메소드

public getDbType ( ) : string
리턴 string database field type.

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

Performs processing on a value before it is used to set the parameter of a IDbCommand.
abstract public getParameter ( $object )

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

Performs processing on a value before after it has been retrieved from a database
abstract public getResult ( $string ) : mixed
리턴 mixed The processed value.

getType() 공개 메소드

public getType ( )

setDbType() 공개 메소드

public setDbType ( $value )

setType() 공개 메소드

public setType ( $value )