PHP 클래스 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');
부터: 3.1
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

공개 메소드들

메소드 설명
get ( $object, $path ) : mixed Gets the property value.
has ( $object, $path ) : boolean
set ( &$originalObject, $path, $value ) Sets the property value.

메소드 상세

get() 공개 정적인 메소드

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

has() 공개 정적인 메소드

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

set() 공개 정적인 메소드

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