src/snac/data/AbstractData.php
/**
     * Required method to import an array into this data object
     *
     * @param string[][] $data The data for this object in an associative array
     */
Required method to import an array into this data object
@param string[][] $data The data for this object in an associative array
Required method to import an array into this data object @param string [] [] $data The data for this object in an associative array
public function fromArray($data) {
        unset($this->id);
        if (isset($data["id"]))
            $this->id = $data["id"];
        else
            $this->id = null;
        unset($this->version);
        if (isset($data["version"]))
            $this->version = $data["version"];
        else
            $this->version = null;
        unset($this->operation);
        if (isset($data["operation"]))
            $this->operation = $data["operation"];
        else
            $this->operation = null;
        unset($this->snacControlMetadata);
        $this->snacControlMetadata = array();
        if (isset($data["snacControlMetadata"])) {
            foreach ($data["snacControlMetadata"] as $i => $entry)
                if ($entry != null)
                    $this->snacControlMetadata[$i] = new SNACControlMetadata($entry);
        }
        unset($this->dateList);
        $this->dateList = array();
        if (isset($data["dates"])) {
            foreach ($data["dates"] as $i => $entry)
                if ($entry != null)
                    $this->dateList[$i] = new SNACDate($entry);
        }
    }
public function fromArray ( $ data ) { unset ( $ this -> id ) ; if ( isset ( $ data [ " id " ] ) ) $ this -> id = $ data [ " id " ] ; else $ this -> id = null ; unset ( $ this -> version ) ; if ( isset ( $ data [ " version " ] ) ) $ this -> version = $ data [ " version " ] ; else $ this -> version = null ; unset ( $ this -> operation ) ; if ( isset ( $ data [ " operation " ] ) ) $ this -> operation = $ data [ " operation " ] ; else $ this -> operation = null ; unset ( $ this -> snacControlMetadata ) ; $ this -> snacControlMetadata = array ( ) ; if ( isset ( $ data [ " snacControlMetadata " ] ) ) { foreach ( $ data [ " snacControlMetadata " ] as $ i => $ entry ) if ( $ entry != null ) $ this -> snacControlMetadata [ $ i ] = new SNACControlMetadata ( $ entry ) ; } unset ( $ this -> dateList ) ; $ this -> dateList = array ( ) ; if ( isset ( $ data [ " dates " ] ) ) { foreach ( $ data [ " dates " ] as $ i => $ entry ) if ( $ entry != null ) $ this -> dateList [ $ i ] = new SNACDate ( $ entry ) ; } }
Required method to import an array into this data object
 @param string[][] $data The data for this object in an associative array
Required method to import an array into this data object @param string [] [] $data The data for this object in an associative array
// Note: inheriting classes should set the maxDateCount appropriately // based on the definition of that class.