コード例 #1
0
ファイル: Room.php プロジェクト: ZiperRom1/awesomeChatRoom
 /**
  * Get the room basic attributes only
  *
  * @return     array  The room basic attributes only
  */
 public function getRoomBasicAttributes()
 {
     return parent::__toArray();
 }
コード例 #2
0
ファイル: User.php プロジェクト: ZiperRom1/awesomeChatRoom
 /**
  * Return the user entity in an array format
  *
  * @return     array  Array with all users attributes
  */
 public function __toArray() : array
 {
     $user = parent::__toArray();
     $user['right'] = $this->right !== null ? $this->right->__toArray() : [];
     $user['roomRight'] = $this->roomRight !== null ? $this->roomRight->__toArray() : [];
     return $user;
 }