src/snac/data/User.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 (
                "userid" => $this->userid,
                "userName" => $this->userName,
                "firstName" => $this->firstName,
                "lastName" => $this->lastName,
                "fullName" => $this->fullName,
                "avatar" => $this->avatar,
                "avatarSmall" => $this->avatarSmall,
                "avatarLarge" => $this->avatarLarge,
                "email" => $this->email,
                "workEmail" => $this->workEmail,
                "workPhone" => $this->workPhone,
                "unreadMessageCount" => $this->numUnreadMessages,
                "active" => $this->active,
                "affiliation" => $this->affiliation==null?null:$this->affiliation->toArray($shorten),
                "token" => $this->token,
                "roleList" => array(),
                "apikeys" => array()
        );
        foreach ($this->roleList as $i => $v)
            $return["roleList"][$i] = $v->toArray($shorten);
        foreach ($this->apikeys as $i => $v)
            $return["apikeys"][$i] = $v->toArray($shorten);
        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 ( " userid " => $ this -> userid , " userName " => $ this -> userName , " firstName " => $ this -> firstName , " lastName " => $ this -> lastName , " fullName " => $ this -> fullName , " avatar " => $ this -> avatar , " avatarSmall " => $ this -> avatarSmall , " avatarLarge " => $ this -> avatarLarge , " email " => $ this -> email , " workEmail " => $ this -> workEmail , " workPhone " => $ this -> workPhone , " unreadMessageCount " => $ this -> numUnreadMessages , " active " => $ this -> active , " affiliation " => $ this -> affiliation == null ? null : $ this -> affiliation -> toArray ( $ shorten ) , " token " => $ this -> token , " roleList " => array ( ) , " apikeys " => array ( ) ) ; foreach ( $ this -> roleList as $ i => $ v ) $ return [ " roleList " ] [ $ i ] = $ v -> toArray ( $ shorten ) ; foreach ( $ this -> apikeys as $ i => $ v ) $ return [ " apikeys " ] [ $ i ] = $ v -> toArray ( $ shorten ) ; 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