Model/User.php
public function parseJson($json)
    {
        $this->mentionName = $json['mention_name'];
        $this->id = $json['id'];
        $this->name = $json['name'];
        if (isset($json['links'])) {
            $this->links = $json['links'];
        }
        if(isset($json['xmpp_jid'])) {
            $this->xmppJid = $json['xmpp_jid'];
            $this->deleted = $json['is_deleted'];
            $this->lastActive = $json['last_active'];
            $this->title = $json['title'];
            $this->created = new \Datetime($json['created']);
            $this->groupAdmin = $json['is_group_admin'];
            $this->timezone = $json['timezone'];
            $this->guest = $json['is_guest'];
            $this->email = $json['email'];
            $this->photoUrl = $json['photo_url'];
        }
    }
public function parseJson($json)
    {
        $this->mentionName = $json['mention_name'];
        $this->id = $json['id'];
        $this->name = $json['name'];
        if (isset($json['links'])) {
            $this->links = $json['links'];
        }
        if(isset($json['xmpp_jid'])) {
            $this->xmppJid = $json['xmpp_jid'];
            $this->deleted = $json['is_deleted'];
            $this->lastActive = $json['last_active'];
            $this->title = $json['title'];
            $this->created = new \Datetime($json['created']);
            $this->groupAdmin = $json['is_group_admin'];
            $this->timezone = $json['timezone'];
            $this->guest = $json['is_guest'];
            $this->email = $json['email'];
            $this->photoUrl = $json['photo_url'];
        }
    }
public function parseJson ( $ json ) { $ this -> mentionName = $ json [ 'mention_name' ] ; $ this -> id = $ json [ 'id' ] ; $ this -> name = $ json [ 'name' ] ; if ( isset ( $ json [ 'links' ] ) ) { $ this -> links = $ json [ 'links' ] ; } if ( isset ( $ json [ 'xmpp_jid' ] ) ) { $ this -> xmppJid = $ json [ 'xmpp_jid' ] ; $ this -> deleted = $ json [ 'is_deleted' ] ; $ this -> lastActive = $ json [ 'last_active' ] ; $ this -> title = $ json [ 'title' ] ; $ this -> created = new \ Datetime ( $ json [ 'created' ] ) ; $ this -> groupAdmin = $ json [ 'is_group_admin' ] ; $ this -> timezone = $ json [ 'timezone' ] ; $ this -> guest = $ json [ 'is_guest' ] ; $ this -> email = $ json [ 'email' ] ; $ this -> photoUrl = $ json [ 'photo_url' ] ; } }
Parses response given by the API and maps the fields to User object

@param array $json json_decoded response in json given by the server

@return void
Parses response given by the API and maps the fields to User object