src/snac/data/NameEntry.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"] != "NameEntry")
            return false;
        parent::fromArray($data);
        if (isset($data["original"]))
            $this->original = $data["original"];
        else
            $this->original = null;
        if (isset($data["preferenceScore"]))
            $this->preferenceScore = $data["preferenceScore"];
        else
            $this->preferenceScore = null;
        unset($this->components);
        $this->components = array();
        if (isset($data["components"]))
            foreach ($data["components"] as $i => $entry)
                if ($entry != null)
                    $this->components[$i] = new \snac\data\NameComponent($entry);
        unset($this->contributors);
        $this->contributors = array();
        if (isset($data["contributors"]))
            foreach ($data["contributors"] as $i => $entry)
                if ($entry != null)
                    $this->contributors[$i] = new \snac\data\Contributor($entry);
        if (isset($data["language"]) && $data["language"] != null)
            $this->language = new Language($data["language"]);
        else
            $this->language = null;
        return true;
    }
public function fromArray ( $ data ) { if ( ! isset ( $ data [ " dataType " ] ) || $ data [ " dataType " ] != " NameEntry " ) return false ; parent :: fromArray ( $ data ) ; if ( isset ( $ data [ " original " ] ) ) $ this -> original = $ data [ " original " ] ; else $ this -> original = null ; if ( isset ( $ data [ " preferenceScore " ] ) ) $ this -> preferenceScore = $ data [ " preferenceScore " ] ; else $ this -> preferenceScore = null ; unset ( $ this -> components ) ; $ this -> components = array ( ) ; if ( isset ( $ data [ " components " ] ) ) foreach ( $ data [ " components " ] as $ i => $ entry ) if ( $ entry != null ) $ this -> components [ $ i ] = new \ snac \ data \ NameComponent ( $ entry ) ; unset ( $ this -> contributors ) ; $ this -> contributors = array ( ) ; if ( isset ( $ data [ " contributors " ] ) ) foreach ( $ data [ " contributors " ] as $ i => $ entry ) if ( $ entry != null ) $ this -> contributors [ $ i ] = new \ snac \ data \ Contributor ( $ entry ) ; if ( isset ( $ data [ " language " ] ) && $ data [ " language " ] != null ) $ this -> language = new Language ( $ data [ " language " ] ) ; else $ this -> language = 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