use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
use Org\Mxchange\CoreFramework\Template\Engine\BaseTemplateEngine;
use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
use Org\Mxchange\CoreFramework\Template\Engine\BaseTemplateEngine;
use Org\Mxchange\CoreFramework\Template\Xml\CompileableXmlTemplate;
// Set XML template type and prefix
$this->xmlTemplateType = $xmlTemplateType;
$this->typePrefix = $typePrefix;
// Set XML template type and prefix
$this->xmlTemplateType = $xmlTemplateType;
$this->typePrefix = $typePrefix;
if (empty($templateBasePath)) {
// Base path is empty
throw new BasePathIsEmptyException($this, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
if (empty($templateBasePath)) {
// Base path is empty
throw new BasePathIsEmptyException($this, self::EXCEPTION_UNEXPECTED_EMPTY_STRING);
} elseif (!is_dir($templateBasePath)) {
// Is not a path
throw new BasePathIsNoDirectoryException(array($this, $templateBasePath), self::EXCEPTION_INVALID_PATH_NAME);
} elseif (!is_dir($templateBasePath)) {
// Is not a path
throw new BasePathIsNoDirectoryException(array($this, $templateBasePath), self::EXCEPTION_INVALID_PATH_NAME);
if (empty($templateName)) {
// Set generic template name
$templateName = $this->typePrefix . '_' . $this->xmlTemplateType . '_template_type';
if (empty($templateName)) {
// Set generic template name
$templateName = $this->typePrefix . '_' . $this->xmlTemplateType . '_template_type';
if (is_null($value)) {
// Bah, needs fixing.
$this->debugInstance(sprintf('[%s:%d]: key=%s returns NULL', __METHOD__, __LINE__, $key));
if (is_null($value)) {
// Bah, needs fixing.
$this->debugInstance(sprintf('[%s:%d]: key=%s returns NULL', __METHOD__, __LINE__, $key));
// Save the parsed raw content in our dependency array
$this->dependencyContent[$node] = $templateInstance->getRawTemplateData();
// Save the parsed raw content in our dependency array
$this->dependencyContent[$node] = $templateInstance->getRawTemplateData();
if (($nodeName != $this->getCurrMainNode()) && (in_array($nodeName, $this->getMainNodes()))) {
// Did not match!
throw new XmlNodeMismatchException (array($this, $nodeName, $this->getCurrMainNode()), XmlParser::EXCEPTION_XML_NODE_MISMATCH);
if (($nodeName != $this->getCurrMainNode()) && (in_array($nodeName, $this->getMainNodes()))) {
// Did not match!
throw new XmlNodeMismatchException (array($this, $nodeName, $this->getCurrMainNode()), XmlParser::EXCEPTION_XML_NODE_MISMATCH);