cast() public method

Return fields of mapper object as an associative array
public cast ( $obj = NULL ) : array
$obj object
return array
示例#1
0
 function cast($obj = NULL)
 {
     $ox = parent::cast($obj);
     $user = new \Model\User($ox['uid']);
     return array_merge($ox, array("user" => $user->cast()));
 }