src/snac/data/ResourceRelation.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["dataType"]) || $data["dataType"] != "ResourceRelation")
            return false;
        parent::fromArray($data);
        if (isset($data["resource"]) && $data["resource"] != null)
            $this->resource = new \snac\data\Resource($data["resource"]);
        else
            $this->resource = null;
        if (isset($data["role"]) && $data["role"] != null)
            $this->role = new \snac\data\Term($data["role"]);
        else
            $this->role = null;
        if (isset($data["content"]))
            $this->content = $data["content"];
        else
            $this->content = null;
        if (isset($data["note"]))
            $this->note = $data["note"];
        else
            $this->note = null;
        return true;
    }
public function fromArray ( $ data ) { if ( ! isset ( $ data [ " dataType " ] ) || $ data [ " dataType " ] != " ResourceRelation " ) return false ; parent :: fromArray ( $ data ) ; if ( isset ( $ data [ " resource " ] ) && $ data [ " resource " ] != null ) $ this -> resource = new \ snac \ data \ Resource ( $ data [ " resource " ] ) ; else $ this -> resource = null ; if ( isset ( $ data [ " role " ] ) && $ data [ " role " ] != null ) $ this -> role = new \ snac \ data \ Term ( $ data [ " role " ] ) ; else $ this -> role = null ; if ( isset ( $ data [ " content " ] ) ) $ this -> content = $ data [ " content " ] ; else $ this -> content = null ; if ( isset ( $ data [ " note " ] ) ) $ this -> note = $ data [ " note " ] ; else $ this -> note = 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