コード例 #1
0
 /**
  *
  * @param string $userId
  * @param Website $website
  * @returns array - the DTO array
  */
 public static function encode($userId, $website)
 {
     $dto = array();
     $userProfileModel = new UserProfileModel($userId);
     $userProfile = UserProfileEncoder::encodeModel($userProfileModel, $website);
     $dto['projectsSettings'] = $userProfile['projects'];
     unset($userProfile['projects']);
     $dto['userProfile'] = $userProfile;
     return $dto;
 }
コード例 #2
0
 public static function encodeModel($model, $website)
 {
     $e = new UserProfileEncoder($website);
     return $e->_encode($model);
 }