From 7966e6d72b539f4cbc01b4b90fd95332dd457995 Mon Sep 17 00:00:00 2001 From: Wouter van den Broek Date: Fri, 26 Feb 2016 12:04:17 +0100 Subject: [PATCH 1/2] TEMPLATE_DIR renamed to PHPFHIR_TEMPLATE_DIR --- src/ClassGenerator/Template/AutoloaderTemplate.php | 2 +- src/ClassGenerator/Template/ParserMapTemplate.php | 2 +- src/ClassGenerator/Template/ResponseParserTemplate.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ClassGenerator/Template/AutoloaderTemplate.php b/src/ClassGenerator/Template/AutoloaderTemplate.php index 910fa736..fa70b42f 100644 --- a/src/ClassGenerator/Template/AutoloaderTemplate.php +++ b/src/ClassGenerator/Template/AutoloaderTemplate.php @@ -86,7 +86,7 @@ public function addPHPFHIRClassEntry(ClassTemplate $classTemplate) public function compileTemplate() { return sprintf( - include TEMPLATE_DIR.'/autoload_template.php', + include PHPFHIR_TEMPLATE_DIR.'/autoload_template.php', $this->_outputNamespace, CopyrightUtils::getBasePHPFHIRCopyrightComment(), var_export($this->_classMap, true) diff --git a/src/ClassGenerator/Template/ParserMapTemplate.php b/src/ClassGenerator/Template/ParserMapTemplate.php index e2296851..a62c412b 100644 --- a/src/ClassGenerator/Template/ParserMapTemplate.php +++ b/src/ClassGenerator/Template/ParserMapTemplate.php @@ -93,7 +93,7 @@ public function compileTemplate() $this->addExtendedClassProperties(); return sprintf( - include TEMPLATE_DIR.'/parser_map_template.php', + include PHPFHIR_TEMPLATE_DIR.'/parser_map_template.php', $this->_outputNamespace, CopyrightUtils::getBasePHPFHIRCopyrightComment(), var_export($this->_bigDumbMap, true) diff --git a/src/ClassGenerator/Template/ResponseParserTemplate.php b/src/ClassGenerator/Template/ResponseParserTemplate.php index 755c7363..a0f3d98a 100644 --- a/src/ClassGenerator/Template/ResponseParserTemplate.php +++ b/src/ClassGenerator/Template/ResponseParserTemplate.php @@ -56,7 +56,7 @@ public function __construct($outputPath, $outputNamespace) public function compileTemplate() { return sprintf( - include TEMPLATE_DIR.'/response_parser_template.php', + include PHPFHIR_TEMPLATE_DIR.'/response_parser_template.php', $this->_outputNamespace, CopyrightUtils::getBasePHPFHIRCopyrightComment() ); From d833db8caaee02ed2e4c28f74cd862397433221c Mon Sep 17 00:00:00 2001 From: Wouter van den Broek Date: Fri, 26 Feb 2016 12:05:32 +0100 Subject: [PATCH 2/2] sprintf argument error --- src/ClassGenerator/Generator/PropertyGenerator.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ClassGenerator/Generator/PropertyGenerator.php b/src/ClassGenerator/Generator/PropertyGenerator.php index 0e83b3c3..03d6244e 100644 --- a/src/ClassGenerator/Generator/PropertyGenerator.php +++ b/src/ClassGenerator/Generator/PropertyGenerator.php @@ -116,6 +116,7 @@ public static function buildProperty(XSDMap $XSDMap, trigger_error(sprintf( 'Unable to determine property name on object "%s" with ref value "%s". Property definition: "%s"', $classTemplate->getElementName(), + $attributes['ref'], $element->saveXML() ));