//------------------ Meta Behavior -------------------------
/** Answer the property value for the object
* If a getter method exists, call it (passing the filter) and return the method result.
* else derive value through default metabehavior
* @param PntSqlFilter $filter to apply, or null if unfiltered (currently only used by multi value properties)
* @return mixed dynmically typed by the PropertyDescriptor>>type
* @throws PntError if property missing, derivation fails, or anything an evetial getter method throws
*/
function ($obj, $filter=true) {
//use getter method if there
$name = $this->();
$mth = "get$name";
if (method_exists($obj, $mth))
return $filter === true
? $obj->$mth()
: $obj->$mth($filter);
return $this->($obj, $filter);
}
|