Ejemplo n.º 1
0
 /**
  * Initializes this FieldValue from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['resource'])) {
         $this->resource = $o["resource"];
         unset($o["resource"]);
     }
     if (isset($o['datatype'])) {
         $this->datatype = $o["datatype"];
         unset($o["datatype"]);
     }
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o["type"]);
     }
     if (isset($o['labelId'])) {
         $this->labelId = $o["labelId"];
         unset($o["labelId"]);
     }
     if (isset($o['text'])) {
         $this->text = $o["text"];
         unset($o["text"]);
     }
     parent::initFromArray($o);
 }
Ejemplo n.º 2
0
 /**
  * Initializes this Fact from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['primary'])) {
         $this->primary = $o["primary"];
         unset($o['primary']);
     }
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o['type']);
     }
     if (isset($o['date'])) {
         $this->date = $o['date'] instanceof DateInfo ? $o['date'] : new DateInfo($o["date"]);
         unset($o['date']);
     }
     if (isset($o['place'])) {
         $this->place = $o['place'] instanceof PlaceReference ? $o['place'] : new PlaceReference($o["place"]);
         unset($o['place']);
     }
     if (isset($o['value'])) {
         $this->value = $o["value"];
         unset($o['value']);
     }
     $this->qualifiers = array();
     if (isset($o['qualifiers'])) {
         foreach ($o['qualifiers'] as $i => $x) {
             $this->qualifiers[$i] = $x instanceof Qualifier ? $x : new Qualifier($x);
         }
         unset($o['qualifiers']);
     }
     $this->fields = array();
     if (isset($o['fields'])) {
         foreach ($o['fields'] as $i => $x) {
             $this->fields[$i] = $x instanceof Field ? $x : new Field($x);
         }
         unset($o['fields']);
     }
     parent::initFromArray($o);
 }
Ejemplo n.º 3
0
 /**
  * Initializes this Gender from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o["type"]);
     }
     $this->fields = array();
     if (isset($o['fields'])) {
         foreach ($o['fields'] as $i => $x) {
             $this->fields[$i] = new Field($x);
         }
         unset($o["fields"]);
     }
     parent::initFromArray($o);
 }
Ejemplo n.º 4
0
 /**
  * Initializes this Subject from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['extracted'])) {
         $this->extracted = $o["extracted"];
         unset($o['extracted']);
     }
     $this->evidence = array();
     if (isset($o['evidence'])) {
         foreach ($o['evidence'] as $i => $x) {
             $this->evidence[$i] = new EvidenceReference($x);
         }
         unset($o['evidence']);
     }
     $this->media = array();
     if (isset($o['media'])) {
         foreach ($o['media'] as $i => $x) {
             $this->media[$i] = new SourceReference($x);
         }
         unset($o['media']);
     }
     $this->identifiers = array();
     if (isset($o['identifiers'])) {
         $this->identifiers = array();
         foreach ($o['identifiers'] as $i => $x) {
             if (!is_array($x)) {
                 $x = array($x);
             }
             foreach ($x as $idValue) {
                 $identifier = new Identifier();
                 $identifier->setType($i);
                 $identifier->setValue($idValue);
                 array_push($this->identifiers, $identifier);
             }
         }
         unset($o['identifiers']);
     }
     parent::initFromArray($o);
 }
Ejemplo n.º 5
0
 /**
  * Initializes this EventRole from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o["type"]);
     }
     if (isset($o['person'])) {
         $this->person = new ResourceReference($o["person"]);
         unset($o["person"]);
     }
     if (isset($o['details'])) {
         $this->details = $o["details"];
         unset($o["details"]);
     }
     parent::initFromArray($o);
 }
Ejemplo n.º 6
0
 /**
  * Initializes this Document from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['textType'])) {
         $this->textType = $o["textType"];
         unset($o["textType"]);
     }
     if (isset($o['extracted'])) {
         $this->extracted = $o["extracted"];
         unset($o["extracted"]);
     }
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o["type"]);
     }
     if (isset($o['text'])) {
         $this->text = $o["text"];
         unset($o["text"]);
     }
     parent::initFromArray($o);
 }
Ejemplo n.º 7
0
 /**
  * Initializes this Name from an associative array
  *
  * @param array $o
  */
 public function initFromArray(array $o)
 {
     if (isset($o['type'])) {
         $this->type = $o["type"];
         unset($o["type"]);
     }
     if (isset($o['preferred'])) {
         $this->preferred = $o["preferred"];
         unset($o["preferred"]);
     }
     if (isset($o['date'])) {
         $this->date = $o["date"] instanceof DateInfo ? $o["date"] : new DateInfo($o["date"]);
         unset($o["date"]);
     }
     $this->nameForms = array();
     if (isset($o['nameForms'])) {
         foreach ($o['nameForms'] as $i => $x) {
             $this->nameForms[$i] = $x instanceof NameForm ? $x : new NameForm($x);
         }
         unset($o["nameForms"]);
     }
     parent::initFromArray($o);
 }