src/snac/data/Message.php
/**
     * Returns this object's data as an associative array
     *
     * @param boolean $shorten optional Whether or not to include null/empty components
     * @return string[][] This objects data in array form
     */
Returns this object's data as an associative array
@param boolean $shorten optional Whether or not to include null/empty components
@return string[][] This objects data in array form
Returns this object ' s data as an associative array @param boolean $shorten optional Whether or not to include null / empty components @return string [] [] This objects data in array form
public function toArray($shorten = true) {
        $return = array (
            "id" => $this->id,
            "toUser" => $this->toUser === null ? null : $this->toUser->toArray(),
            "fromUser" => $this->fromUser === null ? null : $this->fromUser->toArray(),
            "fromString" => $this->fromString,
            "subject" => $this->subject,
            "body" => $this->body,
            "timestamp" => $this->timestamp,
            "read" => $this->read,
            "attachmentContent" => $this->attachmentContent,
            "attachmentFilename" => $this->attachmentFilename
        );
        if ($shorten) {
            $return2 = array ();
            foreach ($return as $i => $v)
                if ($v != null && ! empty($v))
                    $return2[$i] = $v;
            unset($return);
            $return = $return2;
        }
        return $return;
    }
public function toArray ( $ shorten = true ) { $ return = array ( " id " => $ this -> id , " toUser " => $ this -> toUser === null ? null : $ this -> toUser -> toArray ( ) , " fromUser " => $ this -> fromUser === null ? null : $ this -> fromUser -> toArray ( ) , " fromString " => $ this -> fromString , " subject " => $ this -> subject , " body " => $ this -> body , " timestamp " => $ this -> timestamp , " read " => $ this -> read , " attachmentContent " => $ this -> attachmentContent , " attachmentFilename " => $ this -> attachmentFilename ) ; if ( $ shorten ) { $ return2 = array ( ) ; foreach ( $ return as $ i => $ v ) if ( $ v != null && ! empty ( $ v ) ) $ return2 [ $ i ] = $ v ; unset ( $ return ) ; $ return = $ return2 ; } return $ return ; }
Returns this object's data as an associative array
 @param boolean $shorten optional Whether or not to include null/empty components
 @return string[][] This objects data in array form
Returns this object ' s data as an associative array @param boolean $shorten optional Whether or not to include null / empty components @return string [] [] This objects data in array form
// Shorten if necessary