PHP Class Prado\Data\SqlMap\Configuration\TResultMap

A TResultMap lets you control how data is extracted from the result of a query, and how the columns are mapped to object properties. A TResultMap can describe the column type, a null value replacement, and complex property mappings including Collections. The can contain any number of property mappings that map object properties to the columns of a result element. The property mappings are applied, and the columns are read, in the order that they are defined. Maintaining the element order ensures consistent results between different drivers and providers. The {@link Class setClass()} property must be a PHP class object or array instance. The optional {@link Extends setExtends()} attribute can be set to the ID of another upon which to base this . All properties of the "parent" will be included as part of this , and values from the "parent" are set before any values specified by this .
Since: 3.1
Inheritance: extends Prado\TComponent
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) Initialize the columns collection.
addResultProperty ( TResultProperty $property ) Add a TResultProperty to result mapping.
createInstanceOfResult ( $registry ) : mixed Create a new instance of the class of this result map.
getClass ( ) : string
getColumns ( ) : TMap
getDiscriminator ( ) : TDiscriminator
getExtends ( ) : string
getGroupBy ( ) : string
getID ( ) : string
resolveSubMap ( $registry, $row ) : TResultMap Result sub-mappings using the discriminiator column.
setClass ( $value )
setDiscriminator ( TDiscriminator $value )
setExtends ( $value )
setGroupBy ( $value )
setID ( $value )

Method Details

__construct() public méthode

Initialize the columns collection.
public __construct ( )

addResultProperty() public méthode

Add a TResultProperty to result mapping.
public addResultProperty ( TResultProperty $property )
$property TResultProperty

createInstanceOfResult() public méthode

Create a new instance of the class of this result map.
public createInstanceOfResult ( $registry ) : mixed
Résultat mixed new result object.

getClass() public méthode

public getClass ( ) : string
Résultat string result class name.

getColumns() public méthode

public getColumns ( ) : TMap
Résultat Prado\Collections\TMap result columns.

getDiscriminator() public méthode

public getDiscriminator ( ) : TDiscriminator
Résultat TDiscriminator result class discriminator.

getExtends() public méthode

public getExtends ( ) : string
Résultat string result map extends another result map.

getGroupBy() public méthode

public getGroupBy ( ) : string
Résultat string result map groups by.

getID() public méthode

public getID ( ) : string
Résultat string a unique identifier for the .

resolveSubMap() public méthode

Result sub-mappings using the discriminiator column.
public resolveSubMap ( $registry, $row ) : TResultMap
Résultat TResultMap result sub-map.

setClass() public méthode

public setClass ( $value )

setDiscriminator() public méthode

public setDiscriminator ( TDiscriminator $value )
$value TDiscriminator

setExtends() public méthode

public setExtends ( $value )

setGroupBy() public méthode

public setGroupBy ( $value )

setID() public méthode

public setID ( $value )