PHP Class Prado\Data\SqlMap\DataMapper\TPropertyAccess

Access object's properties (and subproperties) using dot path notation. The following are equivalent. echo $obj->property1; echo $obj->getProperty1(); echo $obj['property1']; //$obj may be an array or object echo TPropertyAccess($obj, 'property1'); Setting a property value. $obj1->propert1 = 'hello'; $obj->setProperty('hello'); $obj['property1'] = 'hello'; //$obj may be an array or object TPropertyAccess($obj, 'property1', 'hello'); Subproperties are supported using the dot notation. E.g. echo $obj->property1->property2->property3 echo TPropertyAccess::get($obj, 'property1.property2.property3');
Since: 3.1
ファイルを表示 Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
get ( $object, $path ) : mixed Gets the property value.
has ( $object, $path ) : boolean
set ( &$originalObject, $path, $value ) Sets the property value.

Method Details

get() public static method

Gets the property value.
public static get ( $object, $path ) : mixed
return mixed property value.

has() public static method

public static has ( $object, $path ) : boolean
return boolean true if property path is valid

set() public static method

Sets the property value.
public static set ( &$originalObject, $path, $value )