src/snac/data/Message.php
/**
     * Replaces this object's data with the given associative array
     *
     * @param string[][] $data This objects data in array form
     * @return boolean true on success, false on failure
     */
Replaces this object's data with the given associative array
@param string[][] $data This objects data in array form
@return boolean true on success, false on failure
Replaces this object ' s data with the given associative array @param string [] [] $data This objects data in array form @return boolean true on success false on failure
public function fromArray($data) {
        if (isset($data["id"]))
            $this->fromString = $data["id"];
        else
            $this->fromString = null;
        if (isset($data["toUser"]) && $data["toUser"] !== null)
            $this->toUser = new \snac\data\User($data["toUser"]);
        else
            $this->toUser = null;
        if (isset($data["fromUser"]) && $data["fromUser"] !== null)
            $this->fromUser = new \snac\data\User($data["fromUser"]);
        else
            $this->fromUser = null;
        if (isset($data["fromString"]))
            $this->fromString = $data["fromString"];
        else
            $this->fromString = null;
        if (isset($data["subject"]))
            $this->subject = $data["subject"];
        else
            $this->subject = null;
        if (isset($data["body"]))
            $this->body = $data["body"];
        else
            $this->body = null;
        if (isset($data["timestamp"]))
            $this->timestamp = $data["timestamp"];
        else
            $this->timestamp = null;
        if (isset($data["read"]))
            $this->read = $data["read"];
        else
            $this->read = false;
        if (isset($data["attachmentContent"]))
            $this->attachmentContent = $data["attachmentContent"];
        else
            $this->attachmentContent = null;
        if (isset($data["attachmentFilename"]))
            $this->attachmentFilename = $data["attachmentFilename"];
        else
            $this->attachmentFilename = null;
        return true;
    }
public function fromArray ( $ data ) { if ( isset ( $ data [ " id " ] ) ) $ this -> fromString = $ data [ " id " ] ; else $ this -> fromString = null ; if ( isset ( $ data [ " toUser " ] ) && $ data [ " toUser " ] !== null ) $ this -> toUser = new \ snac \ data \ User ( $ data [ " toUser " ] ) ; else $ this -> toUser = null ; if ( isset ( $ data [ " fromUser " ] ) && $ data [ " fromUser " ] !== null ) $ this -> fromUser = new \ snac \ data \ User ( $ data [ " fromUser " ] ) ; else $ this -> fromUser = null ; if ( isset ( $ data [ " fromString " ] ) ) $ this -> fromString = $ data [ " fromString " ] ; else $ this -> fromString = null ; if ( isset ( $ data [ " subject " ] ) ) $ this -> subject = $ data [ " subject " ] ; else $ this -> subject = null ; if ( isset ( $ data [ " body " ] ) ) $ this -> body = $ data [ " body " ] ; else $ this -> body = null ; if ( isset ( $ data [ " timestamp " ] ) ) $ this -> timestamp = $ data [ " timestamp " ] ; else $ this -> timestamp = null ; if ( isset ( $ data [ " read " ] ) ) $ this -> read = $ data [ " read " ] ; else $ this -> read = false ; if ( isset ( $ data [ " attachmentContent " ] ) ) $ this -> attachmentContent = $ data [ " attachmentContent " ] ; else $ this -> attachmentContent = null ; if ( isset ( $ data [ " attachmentFilename " ] ) ) $ this -> attachmentFilename = $ data [ " attachmentFilename " ] ; else $ this -> attachmentFilename = null ; return true ; }
Replaces this object's data with the given associative array
 @param string[][] $data This objects data in array form
 @return boolean true on success, false on failure
Replaces this object ' s data with the given associative array @param string [] [] $data This objects data in array form @return boolean true on success false on failure