PHP Class Prado\Data\SqlMap\Configuration\TParameterMap

TParameterMap holds one or more parameter child elements that map object properties to placeholders in a SQL statement. A TParameterMap defines an ordered list of values that match up with the placeholders of a parameterized query statement. While the attributes specified by the map still need to be in the correct order, each parameter is named. You can populate the underlying class in any order, and the TParameterMap ensures each value is passed in the correct order. Parameter Maps can be provided as an external element and inline. The element accepts two attributes: id (required) and extends (optional).
Since: 3.1
Inheritance: extends Prado\TComponent
Datei anzeigen Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( ) Initialize the properties and property map collections.
addProperty ( TParameterProperty $property )
getExtends ( ) : string
getID ( ) : string
getProperties ( ) : TParameterProperty[]
getProperty ( $index ) : TParameterProperty
getPropertyNames ( ) : array
getPropertyValue ( $registry, $property, $parameterValue ) : unknown Get the value of a property from the the parameter object.
insertProperty ( $index, TParameterProperty $property )
setExtends ( $value )
setID ( $value )

Protected Methods

Method Description
createTypeHandler ( $property, $registry ) : TSqlMapTypeHandler Create type handler from {@link Type setType()} or {@link TypeHandler setTypeHandler}.
getObjectValue ( $object, $property ) : mixed
nullifyDefaultValue ( $property, $value ) : mixed When the actual value matches the {@link NullValue TParameterProperty::setNullValue()}, set the current value to null.

Method Details

__construct() public method

Initialize the properties and property map collections.
public __construct ( )

addProperty() public method

public addProperty ( TParameterProperty $property )
$property TParameterProperty

createTypeHandler() protected method

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

getExtends() public method

public getExtends ( ) : string
return string name of another upon which to base this TParameterMap.

getID() public method

public getID ( ) : string
return string a unique identifier for the .

getObjectValue() protected method

protected getObjectValue ( $object, $property ) : mixed
return mixed property value.

getProperties() public method

public getProperties ( ) : TParameterProperty[]
return TParameterProperty[] list of properties for the parameter map.

getProperty() public method

public getProperty ( $index ) : TParameterProperty
return TParameterProperty parameter property.

getPropertyNames() public method

public getPropertyNames ( ) : array
return array list of property names.

getPropertyValue() public method

Get the value of a property from the the parameter object.
public getPropertyValue ( $registry, $property, $parameterValue ) : unknown
return unknown

insertProperty() public method

public insertProperty ( $index, TParameterProperty $property )
$property TParameterProperty

nullifyDefaultValue() protected method

When the actual value matches the {@link NullValue TParameterProperty::setNullValue()}, set the current value to null.
protected nullifyDefaultValue ( $property, $value ) : mixed
return mixed null if NullValue matches currrent value.

setExtends() public method

public setExtends ( $value )

setID() public method

public setID ( $value )