src/snac/data/SNACDate.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"] != "SNACDate")
            return false;
        parent::fromArray($data);
        if (isset($data["fromDate"]))
            $this->fromDate = $data["fromDate"];
        else
            $this->fromDate = null;
        if (isset($data["fromDateOriginal"]))
            $this->fromDateOriginal = $data["fromDateOriginal"];
        else
            $this->fromDateOriginal = null;
        if (isset($data["fromType"]) && $data["fromType"] != null)
            $this->fromType = new \snac\data\Term($data["fromType"]);
        else
            $this->fromType = null;
        if (isset($data["fromBC"]))
            $this->fromBC = $data["fromBC"];
        else
            $this->fromBC = false;
        if (isset($data["fromRange"]))
            $this->fromRange = $data["fromRange"];
        else
            $this->fromRange = array("notBefore"=> null, "notAfter"=> "");
        if (isset($data["toDate"]))
            $this->toDate = $data["toDate"];
        else
            $this->toDate = null;
        if (isset($data["toDateOriginal"]))
            $this->toDateOriginal = $data["toDateOriginal"];
        else
            $this->toDateOriginal = null;
        if (isset($data["toType"]) && $data["toType"] != null)
            $this->toType = new \snac\data\Term($data["toType"]);
        else
            $this->toType = null;
        if (isset($data["toBC"]))
            $this->toBC = $data["toBC"];
        else
            $this->toBC = false;
        if (isset($data["toRange"]))
            $this->toRange = $data["toRange"];
        else
            $this->toRange = array("notBefore"=> null, "notAfter"=>null);
        if (isset($data["isRange"]))
            $this->isRange = $data["isRange"];
        else
            $this->isRange = false;
        if (isset($data["note"]))
            $this->note = $data["note"];
        else
            $this->note = null;
        return true;
    }
public function fromArray ( $ data ) { if ( ! isset ( $ data [ " dataType " ] ) || $ data [ " dataType " ] != " SNACDate " ) return false ; parent :: fromArray ( $ data ) ; if ( isset ( $ data [ " fromDate " ] ) ) $ this -> fromDate = $ data [ " fromDate " ] ; else $ this -> fromDate = null ; if ( isset ( $ data [ " fromDateOriginal " ] ) ) $ this -> fromDateOriginal = $ data [ " fromDateOriginal " ] ; else $ this -> fromDateOriginal = null ; if ( isset ( $ data [ " fromType " ] ) && $ data [ " fromType " ] != null ) $ this -> fromType = new \ snac \ data \ Term ( $ data [ " fromType " ] ) ; else $ this -> fromType = null ; if ( isset ( $ data [ " fromBC " ] ) ) $ this -> fromBC = $ data [ " fromBC " ] ; else $ this -> fromBC = false ; if ( isset ( $ data [ " fromRange " ] ) ) $ this -> fromRange = $ data [ " fromRange " ] ; else $ this -> fromRange = array ( " notBefore " => null , " notAfter " => " " ) ; if ( isset ( $ data [ " toDate " ] ) ) $ this -> toDate = $ data [ " toDate " ] ; else $ this -> toDate = null ; if ( isset ( $ data [ " toDateOriginal " ] ) ) $ this -> toDateOriginal = $ data [ " toDateOriginal " ] ; else $ this -> toDateOriginal = null ; if ( isset ( $ data [ " toType " ] ) && $ data [ " toType " ] != null ) $ this -> toType = new \ snac \ data \ Term ( $ data [ " toType " ] ) ; else $ this -> toType = null ; if ( isset ( $ data [ " toBC " ] ) ) $ this -> toBC = $ data [ " toBC " ] ; else $ this -> toBC = false ; if ( isset ( $ data [ " toRange " ] ) ) $ this -> toRange = $ data [ " toRange " ] ; else $ this -> toRange = array ( " notBefore " => null , " notAfter " => null ) ; if ( isset ( $ data [ " isRange " ] ) ) $ this -> isRange = $ data [ " isRange " ] ; else $ this -> isRange = false ; 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