/** * @param string $outputPath * @param string $outputNamespace * @param string $class */ public function __construct($outputPath, $outputNamespace, $class) { $this->outputPath = rtrim($outputPath, "\\/"); $this->outputNamespace = $outputNamespace; if (NameUtils::isValidClassName($class)) { $this->class = $class; } else { throw new \RuntimeException(sprintf('%s::__construct - Specified invalid class name %s.', get_called_class(), $class)); } $this->classPath = sprintf('%s/%s/%s.php', $this->outputPath, FileUtils::buildDirPathFromNS($this->outputNamespace), $class); $this->className = sprintf('%s\\%s', $this->outputNamespace, $class); }
/** * @param string $xsdPath * @param string $outputPath * @param string $outputNamespace */ private static function _initializeClasses($xsdPath, $outputPath, $outputNamespace) { // Initialize some of our static classes CopyrightUtils::compileCopyrights($xsdPath); ClassGenerator::init($outputNamespace); // Create root NS dir FileUtils::createDirsFromNS($outputPath, $outputNamespace); }
/** * @param string $outputPath * @return string */ public function compileFullOutputPath($outputPath) { return sprintf('%s/%s/%s.php', $outputPath, FileUtils::buildDirPathFromNS($this->getNamespace()), $this->getClassName()); }