コード例 #1
0
 /**
  * @return array
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     if (null !== $this->metadata) {
         $json['metadata'] = $this->metadata->jsonSerialize();
     }
     if (0 < count($this->action)) {
         $json['action'] = array();
         foreach ($this->action as $action) {
             $json['action'][] = $action->jsonSerialize();
         }
     }
     return $json;
 }
コード例 #2
0
 /**
  * @return array
  */
 public function jsonSerialize()
 {
     $json = parent::jsonSerialize();
     $json['resourceType'] = $this->_fhirElementName;
     if (null !== $this->url) {
         $json['url'] = $this->url->jsonSerialize();
     }
     if (null !== $this->version) {
         $json['version'] = $this->version->jsonSerialize();
     }
     if (null !== $this->name) {
         $json['name'] = $this->name->jsonSerialize();
     }
     if (null !== $this->status) {
         $json['status'] = $this->status->jsonSerialize();
     }
     if (null !== $this->identifier) {
         $json['identifier'] = $this->identifier->jsonSerialize();
     }
     if (null !== $this->experimental) {
         $json['experimental'] = $this->experimental->jsonSerialize();
     }
     if (null !== $this->publisher) {
         $json['publisher'] = $this->publisher->jsonSerialize();
     }
     if (0 < count($this->contact)) {
         $json['contact'] = array();
         foreach ($this->contact as $contact) {
             $json['contact'][] = $contact->jsonSerialize();
         }
     }
     if (null !== $this->date) {
         $json['date'] = $this->date->jsonSerialize();
     }
     if (null !== $this->description) {
         $json['description'] = $this->description->jsonSerialize();
     }
     if (0 < count($this->useContext)) {
         $json['useContext'] = array();
         foreach ($this->useContext as $useContext) {
             $json['useContext'][] = $useContext->jsonSerialize();
         }
     }
     if (null !== $this->requirements) {
         $json['requirements'] = $this->requirements->jsonSerialize();
     }
     if (null !== $this->copyright) {
         $json['copyright'] = $this->copyright->jsonSerialize();
     }
     if (null !== $this->metadata) {
         $json['metadata'] = $this->metadata->jsonSerialize();
     }
     if (null !== $this->multiserver) {
         $json['multiserver'] = $this->multiserver->jsonSerialize();
     }
     if (0 < count($this->fixture)) {
         $json['fixture'] = array();
         foreach ($this->fixture as $fixture) {
             $json['fixture'][] = $fixture->jsonSerialize();
         }
     }
     if (0 < count($this->profile)) {
         $json['profile'] = array();
         foreach ($this->profile as $profile) {
             $json['profile'][] = $profile->jsonSerialize();
         }
     }
     if (0 < count($this->variable)) {
         $json['variable'] = array();
         foreach ($this->variable as $variable) {
             $json['variable'][] = $variable->jsonSerialize();
         }
     }
     if (null !== $this->setup) {
         $json['setup'] = $this->setup->jsonSerialize();
     }
     if (0 < count($this->test)) {
         $json['test'] = array();
         foreach ($this->test as $test) {
             $json['test'][] = $test->jsonSerialize();
         }
     }
     if (null !== $this->teardown) {
         $json['teardown'] = $this->teardown->jsonSerialize();
     }
     return $json;
 }