1 <?php
namespace HL7\FHIR\STU3\FHIRElement
;
4 * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
5 * class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
7 * Class creation date: February 10th, 2018
10 use HL7\FHIR\STU3\FHIRElement
;
13 * Telecommunications form for contact point
14 * If the element is present, it must have either a @value, an @id, or extensions
16 class FHIRContactPointSystem
extends FHIRElement
implements \JsonSerializable
26 private $_fhirElementName = 'ContactPointSystem';
31 public function getValue()
37 * @param string $value
40 public function setValue($value)
42 $this->value
= $value;
49 public function get_fhirElementName()
51 return $this->_fhirElementName
;
57 public function __construct($data = [])
59 if (is_array($data)) {
60 if (isset($data['value'])) {
61 $this->setValue($data['value']);
63 } else if (null !== $data) {
64 throw new \
InvalidArgumentException('$data expected to be array of values, saw "'.gettype($data).'"');
66 parent
::__construct($data);
72 public function __toString()
74 return (string)$this->getValue();
80 public function jsonSerialize()
86 * @param boolean $returnSXE
87 * @param \SimpleXMLElement $sxe
88 * @return string|\SimpleXMLElement
90 public function xmlSerialize($returnSXE = false, $sxe = null)
93 $sxe = new \
SimpleXMLElement('<ContactPointSystem xmlns="http://hl7.org/fhir"></ContactPointSystem>');
95 $sxe->addAttribute('value', $this->value
);
99 return $sxe->saveXML();