PHP Class phpDataMapper_Entity, phpDataMapper

Show file Open project: vlucas/phpDataMapper Class Usage Examples

Protected Properties

Property Type Description
$_data
$_dataModified
$_getterIgnore
$_loaded
$_setterIgnore

Public Methods

Method Description
__construct ( $data = null ) Constructor function
__get ( $var ) Getter
__isset ( $key ) Enable isset() for object properties
__set ( $var, $value ) Setter
data ( $data = null ) Sets an object or array
dataModified ( ) : array Returns array of key => value pairs for row data
loaded ( boolean $loaded ) Mark row as 'loaded' Any data set after row is loaded will be modified data
toArray ( ) : array Returns array of key => value pairs for row data
toJson ( ) Return JSON-encoded row (convenience function) Only works for basic objects right now

Method Details

__construct() public method

Constructor function
public __construct ( $data = null )

__get() public method

Getter
public __get ( $var )

__isset() public method

Enable isset() for object properties
public __isset ( $key )

__set() public method

Setter
public __set ( $var, $value )

data() public method

Sets an object or array
public data ( $data = null )

dataModified() public method

Returns array of key => value pairs for row data
public dataModified ( ) : array
return array

loaded() public method

Mark row as 'loaded' Any data set after row is loaded will be modified data
public loaded ( boolean $loaded )
$loaded boolean

toArray() public method

Returns array of key => value pairs for row data
public toArray ( ) : array
return array

toJson() public method

Return JSON-encoded row (convenience function) Only works for basic objects right now
public toJson ( )

Property Details

$_data protected property

protected $_data

$_dataModified protected property

protected $_dataModified

$_getterIgnore protected property

protected $_getterIgnore

$_loaded protected property

protected $_loaded

$_setterIgnore protected property

protected $_setterIgnore