|
@@ -49,40 +49,22 @@ class room_info
|
|
|
return $this->mParams['tmp_name'];
|
|
|
}
|
|
|
|
|
|
- public function format($mode = 'fast')
|
|
|
+ public function format()
|
|
|
{
|
|
|
$ret = [];
|
|
|
|
|
|
- if($mode == 'fast')
|
|
|
- {
|
|
|
- $ret['room_id'] = $this->room_id();
|
|
|
- $ret['type'] = $this->type();
|
|
|
- $ret['name'] = $this->name();
|
|
|
- $ret['tmp_name'] = $this->tmp_name();
|
|
|
- $ret['avatar'] = $this->avatar();
|
|
|
- $ret['users'] = $this->user_count();
|
|
|
-
|
|
|
- return $ret;
|
|
|
- }
|
|
|
- elseif($mode == 'all')
|
|
|
- {
|
|
|
- $ret['room_id'] = $this->room_id();
|
|
|
- $ret['type'] = $this->type();
|
|
|
- $ret['name'] = $this->name();
|
|
|
- $ret['tmp_name'] = $this->tmp_name();
|
|
|
- $ret['avatar'] = $this->avatar();
|
|
|
- $ret['users'] = $this->user_count();
|
|
|
- $ret['max_user'] = $this->max_user();
|
|
|
- $ret['room_time'] = $this->room_time();
|
|
|
- $ret['creator'] = $this->creator();
|
|
|
- $ret['owner'] = $this->owner();
|
|
|
- $ret['owner_name'] = $this->owner_name();
|
|
|
-
|
|
|
- return $ret;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public function fast_format(){
|
|
|
+ $ret['room_id'] = $this->room_id();
|
|
|
+ $ret['type'] = $this->type();
|
|
|
+ $ret['name'] = $this->name();
|
|
|
+ $ret['tmp_name'] = $this->tmp_name();
|
|
|
+ $ret['avatar'] = $this->avatar();
|
|
|
+ $ret['users'] = $this->user_count();
|
|
|
+ $ret['max_user'] = $this->max_user();
|
|
|
+ $ret['room_time'] = $this->room_time();
|
|
|
+ $ret['creator'] = $this->creator();
|
|
|
+ $ret['owner'] = $this->owner();
|
|
|
+ $ret['owner_name'] = $this->owner_name();
|
|
|
|
|
|
+ return $ret;
|
|
|
}
|
|
|
}
|