function __construct(CHL7v2Entity $parent, CHL7v2DOMElement $specs, $self_pos, $separators) { parent::__construct(); $this->parent = $parent; // Separators stack $this->separator = array_shift($separators); $this->separators = $separators; // Intrinsic properties $this->length = (int) $specs->getAttribute("length"); $this->table = (int) $specs->getAttribute("table"); $this->datatype = $specs->queryTextNode("datatype"); $this->description = $specs->queryTextNode("description"); $this->self_pos = $self_pos; }
function __construct(CHL7v2SegmentGroup $parent, CHL7v2DOMElement $self_specs) { parent::__construct($parent); $this->parent = $parent; $this->specs = $self_specs; $name = $self_specs->getAttribute("name"); $segments = $self_specs->query(".//segment"); $values = array(); foreach ($segments as $_segment) { $values[] = $_segment->nodeValue; } $this->name = $name ? $name : implode(" ", $values); $parent->appendChild($this); }
function __construct(CHL7v2Segment $segment, CHL7v2DOMElement $spec) { parent::__construct($segment); $this->owner_segment = $segment; $this->name = $spec->queryTextNode("name"); $this->datatype = $spec->queryTextNode("datatype"); $this->length = (int) $spec->getAttribute("length"); $this->table = (int) $spec->getAttribute("table"); $this->meta_spec = $spec; /*if ($this->datatype == "TS") { $this->datatype = "DTM"; }*/ $this->description = $spec->queryTextNode("description"); $this->required = $spec->isRequired(); $this->forbidden = $spec->isForbidden(); $this->unbounded = $spec->isUnbounded(); }
/** * @see parent::__construct */ function __construct(CHL7v2SegmentGroup $parent) { parent::__construct($parent); $this->parent = $parent; }