PHP Class Prado\Data\SqlMap\Configuration\TResultProperty

The {@link NullValue setNullValue()} attribute can be set to any valid value (based on property type). The {@link NullValue setNullValue()} attribute is used to specify an outgoing null value replacement. What this means is that when a null value is detected in the result, the corresponding value of the {@link NullValue getNullValue()} will be used instead. The {@link Select setSelect()} property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types. The value of the {@link Select setSelect()} property must be the name of another mapped statement. The value of the database {@link Column setColumn()} that is defined in the same property element as this statement attribute will be passed to the related mapped statement as the parameter. The {@link LazyLoad setLayLoad()} attribute can be specified with the {@link Select setSelect()} .
Since: 3.1
Inheritance: extends Prado\TComponent
Mostra file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( $resultMap = null ) Gets the containing result map ID.
__sleep ( )
getColumn ( ) : string
getColumnIndex ( ) : integer
getLazyLoad ( ) : boolean
getNestedResultMap ( ) : TResultMap
getNullValue ( ) : mixed
getProperty ( ) : string
getPropertyValue ( $registry, $row ) : mixed Gets the value for the current property, converts to applicable type if necessary.
getResultMapping ( ) : string
getSelect ( ) : string
getType ( ) : string
getTypeHandler ( ) : string
instanceOfArrayType ( $target ) : boolean Returns true if the result property {@link Type getType()} is of \ArrayAccess or that the actual result object is an array or implements \ArrayAccess
instanceOfListType ( $target ) : boolean Returns true if the result property {@link Type getType()} is of TList type or that the actual result object is an instance of TList.
setColumn ( $value )
setColumnIndex ( $value )
setLazyLoad ( $value )
setNestedResultMap ( $value )
setNullValue ( $value )
setProperty ( $value )
setResultMapping ( $value )
setSelect ( $value ) The select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types.
setType ( $value )
setTypeHandler ( $value )

Protected Methods

Method Description
createTypeHandler ( $registry ) : TSqlMapTypeHandler Create type handler from {@link Type setType()} or {@link TypeHandler setTypeHandler}.
getPropertyValueType ( ) : integer Determines if the type is an instance of \ArrayAccess, TList or an array.
getTypedValue ( $registry, $value ) : mixed

Method Details

__construct() public method

Gets the containing result map ID.
public __construct ( $resultMap = null )

__sleep() public method

public __sleep ( )

createTypeHandler() protected method

Create type handler from {@link Type setType()} or {@link TypeHandler setTypeHandler}.
protected createTypeHandler ( $registry ) : TSqlMapTypeHandler
return TSqlMapTypeHandler type handler.

getColumn() public method

public getColumn ( ) : string
return string name of the column in the result set from which the value will be used to populate the property.

getColumnIndex() public method

public getColumnIndex ( ) : integer
return integer index of the column in the ResultSet from which the value will be used to populate the object property

getLazyLoad() public method

public getLazyLoad ( ) : boolean
return boolean indicate whether or not the select statement's results should be lazy loaded

getNestedResultMap() public method

public getNestedResultMap ( ) : TResultMap
return TResultMap nested result map.

getNullValue() public method

public getNullValue ( ) : mixed
return mixed null value replacement.

getProperty() public method

public getProperty ( ) : string
return string name of a property of the result object that will be set to.

getPropertyValue() public method

Gets the value for the current property, converts to applicable type if necessary.
public getPropertyValue ( $registry, $row ) : mixed
return mixed property value.

getPropertyValueType() protected method

Determines if the type is an instance of \ArrayAccess, TList or an array.
protected getPropertyValueType ( ) : integer
return integer TResultProperty::LIST_TYPE or TResultProperty::ARRAY_TYPE

getResultMapping() public method

public getResultMapping ( ) : string
return string ID of another used to fill the property.

getSelect() public method

public getSelect ( ) : string
return string name of another mapped statement

getType() public method

public getType ( ) : string
return string property type of the object property to be set.

getTypeHandler() public method

public getTypeHandler ( ) : string
return string custom type handler class name (may use namespace).

getTypedValue() protected method

protected getTypedValue ( $registry, $value ) : mixed
return mixed property value casted to specific type.

instanceOfArrayType() public method

Returns true if the result property {@link Type getType()} is of \ArrayAccess or that the actual result object is an array or implements \ArrayAccess
public instanceOfArrayType ( $target ) : boolean
return boolean true if the result object is an instance of \ArrayAccess or is an array.

instanceOfListType() public method

Returns true if the result property {@link Type getType()} is of TList type or that the actual result object is an instance of TList.
public instanceOfListType ( $target ) : boolean
return boolean true if the result object is an instance of TList

setColumn() public method

public setColumn ( $value )

setColumnIndex() public method

public setColumnIndex ( $value )

setLazyLoad() public method

public setLazyLoad ( $value )

setNestedResultMap() public method

public setNestedResultMap ( $value )

setNullValue() public method

public setNullValue ( $value )

setProperty() public method

public setProperty ( $value )

setResultMapping() public method

public setResultMapping ( $value )

setSelect() public method

The select property is used to describe a relationship between objects and to automatically load complex (i.e. user defined) property types.
public setSelect ( $value )

setType() public method

public setType ( $value )

setTypeHandler() public method

public setTypeHandler ( $value )