public function generate()
    {
        $this->beforeGeneration();

        $this->config->getLogger()->startBreak('Class Generation');
        foreach ($this->XSDMap as $fhirElementName => $mapEntry) {
            $this->config->getLogger()->debug("Generating class for element {$fhirElementName}...");
            $classTemplate = ClassGenerator::buildFHIRElementClassTemplate($this->config, $this->XSDMap, $mapEntry);

            FileUtils::createDirsFromNS($classTemplate->getNamespace(), $this->config);

            // Generate class file
            MethodGenerator::implementConstructor($this->config, $classTemplate);
            $classTemplate->writeToFile($this->config->getOutputPath());

            $this->mapTemplate->addEntry($classTemplate);
            $this->autoloadMap->addPHPFHIRClassEntry($classTemplate);
            $this->config->getLogger()->debug("{$fhirElementName} completed.");
        }
        $this->config->getLogger()->endBreak('Class Generation');

        $this->afterGeneration();
    }
public function generate()
    {
        $this->beforeGeneration();

        $this->config->getLogger()->startBreak('Class Generation');
        foreach ($this->XSDMap as $fhirElementName => $mapEntry) {
            $this->config->getLogger()->debug("Generating class for element {$fhirElementName}...");
            $classTemplate = ClassGenerator::buildFHIRElementClassTemplate($this->config, $this->XSDMap, $mapEntry);

            FileUtils::createDirsFromNS($classTemplate->getNamespace(), $this->config);

            // Generate class file
            MethodGenerator::implementConstructor($this->config, $classTemplate);
            $classTemplate->writeToFile($this->config->getOutputPath());

            $this->mapTemplate->addEntry($classTemplate);
            $this->autoloadMap->addPHPFHIRClassEntry($classTemplate);
            $this->config->getLogger()->debug("{$fhirElementName} completed.");
        }
        $this->config->getLogger()->endBreak('Class Generation');

        $this->afterGeneration();
    }
public function generate ( ) { $ this -> beforeGeneration ( ) ; $ this -> config -> getLogger ( ) -> startBreak ( 'Class Generation' ) ; foreach ( $ this -> XSDMap as $ fhirElementName => $ mapEntry ) { $ this -> config -> getLogger ( ) -> debug ( "Generating class for element {$fhirElementName}..." ) ; $ classTemplate = ClassGenerator :: buildFHIRElementClassTemplate ( $ this -> config , $ this -> XSDMap , $ mapEntry ) ; FileUtils :: createDirsFromNS ( $ classTemplate -> getNamespace ( ) , $ this -> config ) ; // Generate class file MethodGenerator :: implementConstructor ( $ this -> config , $ classTemplate ) ; $ classTemplate -> writeToFile ( $ this -> config -> getOutputPath ( ) ) ; $ this -> mapTemplate -> addEntry ( $ classTemplate ) ; $ this -> autoloadMap -> addPHPFHIRClassEntry ( $ classTemplate ) ; $ this -> config -> getLogger ( ) -> debug ( "{$fhirElementName} completed." ) ; } $ this -> config -> getLogger ( ) -> endBreak ( 'Class Generation' ) ; $ this -> afterGeneration ( ) ; }
Generate FHIR object classes based on XSD
Generate FHIR object classes based on XSD