src/snac/data/Assertion.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) {
        parent::fromArray($data);
        foreach ($this->constellations as $i => $v)
            $return["constellations"][$i] = $v->toArray($shorten);
        if (isset($data["type"]))
            $this->type = $data["type"];
        else
            $this->type = null;
        if (isset($data["text"]))
            $this->text = $data["text"];
        else
            $this->text = null;
        if (isset($data["timestamp"]))
            $this->timestamp = $data["timestamp"];
        else
            $this->timestamp = null;
        if (isset($data["user"]) && $data['user'] != null)
            $this->user = new \snac\data\User($data["user"]);
        else
            $this->user = null;
        unset($this->constellations);
        $this->constellations = array();
        if (isset($data["constellations"])) {
            foreach ($data["constellations"] as $i => $entry) {
                if ($entry != null)
                    $this->constellations[$i] = new \snac\data\Constellation($entry);
            }
        }
        return true;
    }
public function fromArray ( $ data ) { parent :: fromArray ( $ data ) ; foreach ( $ this -> constellations as $ i => $ v ) $ return [ " constellations " ] [ $ i ] = $ v -> toArray ( $ shorten ) ; if ( isset ( $ data [ " type " ] ) ) $ this -> type = $ data [ " type " ] ; else $ this -> type = null ; if ( isset ( $ data [ " text " ] ) ) $ this -> text = $ data [ " text " ] ; else $ this -> text = null ; if ( isset ( $ data [ " timestamp " ] ) ) $ this -> timestamp = $ data [ " timestamp " ] ; else $ this -> timestamp = null ; if ( isset ( $ data [ " user " ] ) && $ data [ 'user' ] != null ) $ this -> user = new \ snac \ data \ User ( $ data [ " user " ] ) ; else $ this -> user = null ; unset ( $ this -> constellations ) ; $ this -> constellations = array ( ) ; if ( isset ( $ data [ " constellations " ] ) ) { foreach ( $ data [ " constellations " ] as $ i => $ entry ) { if ( $ entry != null ) $ this -> constellations [ $ i ] = new \ snac \ data \ Constellation ( $ entry ) ; } } 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