Skip to content

Commit

Permalink
latest output from generator
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Dec 22, 2019
1 parent 0d67bd2 commit 8bdc0ab
Show file tree
Hide file tree
Showing 6,206 changed files with 439,316 additions and 16,870 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
34 changes: 31 additions & 3 deletions src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBase64BinaryPrimitive.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
* class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
*
* Class creation date: December 7th, 2019 16:36+0000
* Class creation date: December 22nd, 2019 07:24+0000
*
* PHPFHIR Copyright:
*
Expand Down Expand Up @@ -63,6 +63,8 @@
*/
class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface
{
use PHPFHIRValidationAssertionsTrait;

// name of FHIR type this class describes
const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE;
const FIELD_VALUE = 'value';
Expand All @@ -79,7 +81,7 @@ class FHIRBase64BinaryPrimitive implements PHPFHIRTypeInterface
* Validation map for fields in type base64Binary-primitive
* @var array
*/
private static $_fieldValidation = [ ];
private static $_validationRules = [ ];

/**
* FHIRBase64BinaryPrimitive Constructor
Expand Down Expand Up @@ -173,11 +175,37 @@ public function _writeToFile($fileHandle)
}
/**
* Returns the validation rules that this type's fields must comply with to be considered "valid"
* The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
*
* @return array
*/
public function _validationErrors()
public function _getValidationRules()
{
return self::$_validationRules;
}

/**
* Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as
* passing.
*
* @return array
*/
public function _getValidationErrors()
{
$errs = [];
$validationRules = $this->_getValidationRules();
if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) {
foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) {
$err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BASE_64BINARY_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v);
if (null !== $err) {
if (!isset($errs[self::FIELD_VALUE])) {
$errs[self::FIELD_VALUE] = [];
}
$errs[self::FIELD_VALUE][$rule] = $err;
}
}
}
return $errs;
}

Expand Down
32 changes: 29 additions & 3 deletions src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBinary.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
* class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
*
* Class creation date: December 7th, 2019 16:36+0000
* Class creation date: December 22nd, 2019 07:24+0000
*
* PHPFHIR Copyright:
*
Expand Down Expand Up @@ -64,6 +64,7 @@
class FHIRBinary implements PHPFHIRCommentContainerInterface, PHPFHIRContainedTypeInterface
{
use PHPFHIRCommentContainerTrait;
use PHPFHIRValidationAssertionsTrait;

// name of FHIR type this class describes
const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BINARY;
Expand All @@ -88,7 +89,7 @@ class FHIRBinary implements PHPFHIRCommentContainerInterface, PHPFHIRContainedTy
* Validation map for fields in type Binary
* @var array
*/
private static $_fieldValidation = [ ];
private static $_validationRules = [ ];

/**
* FHIRBinary Constructor
Expand Down Expand Up @@ -225,11 +226,36 @@ public function setId($id = null)
}

/**
* Returns the validation rules that this type's fields must comply with to be considered "valid"
* The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
*
* @return array
*/
public function _validationErrors()
public function _getValidationRules()
{
return self::$_validationRules;
}

/**
* Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as
* passing.
*
* @return array
*/
public function _getValidationErrors()
{
$errs = [];
$validationRules = $this->_getValidationRules();
if (null !== ($v = $this->getContentType())) {
if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
$errs[self::FIELD_CONTENT_TYPE] = $fieldErrs;
}
}
if (null !== ($v = $this->getId())) {
if ([] !== ($fieldErrs = $v->_getValidationErrors())) {
$errs[self::FIELD_ID] = $fieldErrs;
}
}
return $errs;
}

Expand Down
34 changes: 31 additions & 3 deletions src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRBooleanPrimitive.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
* class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
*
* Class creation date: December 7th, 2019 16:36+0000
* Class creation date: December 22nd, 2019 07:24+0000
*
* PHPFHIR Copyright:
*
Expand Down Expand Up @@ -63,6 +63,8 @@
*/
class FHIRBooleanPrimitive implements PHPFHIRTypeInterface
{
use PHPFHIRValidationAssertionsTrait;

// name of FHIR type this class describes
const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE;
const FIELD_VALUE = 'value';
Expand All @@ -79,7 +81,7 @@ class FHIRBooleanPrimitive implements PHPFHIRTypeInterface
* Validation map for fields in type boolean-primitive
* @var array
*/
private static $_fieldValidation = [ ];
private static $_validationRules = [ ];

/**
* FHIRBooleanPrimitive Constructor
Expand Down Expand Up @@ -159,11 +161,37 @@ public function setValue($value = null)
}

/**
* Returns the validation rules that this type's fields must comply with to be considered "valid"
* The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
*
* @return array
*/
public function _validationErrors()
public function _getValidationRules()
{
return self::$_validationRules;
}

/**
* Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as
* passing.
*
* @return array
*/
public function _getValidationErrors()
{
$errs = [];
$validationRules = $this->_getValidationRules();
if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) {
foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) {
$err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_BOOLEAN_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v);
if (null !== $err) {
if (!isset($errs[self::FIELD_VALUE])) {
$errs[self::FIELD_VALUE] = [];
}
$errs[self::FIELD_VALUE][$rule] = $err;
}
}
}
return $errs;
}

Expand Down
34 changes: 31 additions & 3 deletions src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRCodePrimitive.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
* class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
*
* Class creation date: December 7th, 2019 16:36+0000
* Class creation date: December 22nd, 2019 07:24+0000
*
* PHPFHIR Copyright:
*
Expand Down Expand Up @@ -63,6 +63,8 @@
*/
class FHIRCodePrimitive implements PHPFHIRTypeInterface
{
use PHPFHIRValidationAssertionsTrait;

// name of FHIR type this class describes
const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE;
const FIELD_VALUE = 'value';
Expand All @@ -79,7 +81,7 @@ class FHIRCodePrimitive implements PHPFHIRTypeInterface
* Validation map for fields in type code-primitive
* @var array
*/
private static $_fieldValidation = [
private static $_validationRules = [
self::FIELD_VALUE => [
PHPFHIRConstants::VALIDATE_MIN_LENGTH => 1,
],
Expand Down Expand Up @@ -163,11 +165,37 @@ public function setValue($value)
}

/**
* Returns the validation rules that this type's fields must comply with to be considered "valid"
* The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
*
* @return array
*/
public function _validationErrors()
public function _getValidationRules()
{
return self::$_validationRules;
}

/**
* Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as
* passing.
*
* @return array
*/
public function _getValidationErrors()
{
$errs = [];
$validationRules = $this->_getValidationRules();
if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) {
foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) {
$err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CODE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v);
if (null !== $err) {
if (!isset($errs[self::FIELD_VALUE])) {
$errs[self::FIELD_VALUE] = [];
}
$errs[self::FIELD_VALUE][$rule] = $err;
}
}
}
return $errs;
}

Expand Down
36 changes: 32 additions & 4 deletions src/DCarbone/PHPFHIRGenerated/DSTU1/FHIRDatePrimitive.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
* class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
*
* Class creation date: December 7th, 2019 16:36+0000
* Class creation date: December 22nd, 2019 07:24+0000
*
* PHPFHIR Copyright:
*
Expand Down Expand Up @@ -63,6 +63,8 @@
*/
class FHIRDatePrimitive implements PHPFHIRTypeInterface
{
use PHPFHIRValidationAssertionsTrait;

// name of FHIR type this class describes
const FHIR_TYPE_NAME = PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE;
const FIELD_VALUE = 'value';
Expand All @@ -79,7 +81,7 @@ class FHIRDatePrimitive implements PHPFHIRTypeInterface
* Validation map for fields in type date-primitive
* @var array
*/
private static $_fieldValidation = [
private static $_validationRules = [
self::FIELD_VALUE => [
PHPFHIRConstants::VALIDATE_PATTERN => '/^\\d{4}(\\-\\d{2}(\\-\\d{2})?)?(Z|(\\+|\\-)\\d{2}:\\d{2})?$/',
],
Expand Down Expand Up @@ -172,7 +174,7 @@ public function _getDateTime()
if (null === $value) {
return null;
}
if ([] !== $this->_validationErrors()) {
if ([] !== $this->_getValidationErrors()) {
throw new \DomainException(sprintf(
'Cannot convert "%s" to \\DateTime as it does not conform to "%s"',
$value,
Expand All @@ -192,11 +194,37 @@ public function _getDateTime()
}

/**
* Returns the validation rules that this type's fields must comply with to be considered "valid"
* The returned array is in ["fieldname[.offset]" => ["rule" => {constraint}]]
*
* @return array
*/
public function _validationErrors()
public function _getValidationRules()
{
return self::$_validationRules;
}

/**
* Validates that this type conforms to the specifications set forth for it by FHIR. An empty array must be seen as
* passing.
*
* @return array
*/
public function _getValidationErrors()
{
$errs = [];
$validationRules = $this->_getValidationRules();
if (isset($validationRules[self::FIELD_VALUE]) && null !== ($v = $this->getValue())) {
foreach($validationRules[self::FIELD_VALUE] as $rule => $constraint) {
$err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DATE_HYPHEN_PRIMITIVE, self::FIELD_VALUE, $rule, $constraint, $v);
if (null !== $err) {
if (!isset($errs[self::FIELD_VALUE])) {
$errs[self::FIELD_VALUE] = [];
}
$errs[self::FIELD_VALUE][$rule] = $err;
}
}
}
return $errs;
}

Expand Down
Loading

0 comments on commit 8bdc0ab

Please sign in to comment.