$this->loadRawTemplateData($fileInstance);
} catch (FileNotFoundException $e) {
// If we shall load a code-template we need to switch the file extension
- if (($this->getTemplateType() != $this->getConfigInstance()->getConfigEntry('html_template_type')) && (empty($extOther))) {
+ if (($this->getTemplateType() != FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('html_template_type')) && (empty($extOther))) {
// Switch over to the code-template extension and try it again
$ext = $this->getCodeTemplateExtension();
*/
public function loadHtmlTemplate (string $template) {
// Set template type
- $this->setTemplateType($this->getConfigInstance()->getConfigEntry('html_template_type'));
+ $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('html_template_type'));
// Load the special template
$this->loadTemplate($template);
$variableName = trim(StringUtils::convertDashesToUnderscores($variableName));
// Sweet and simple...
- //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName));
- $this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName));
+ //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: variableName=' . $variableName . ',getConfigEntry()=' . FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($variableName));
+ $this->assignVariable($variableName, FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($variableName));
}
/**
*/
public function loadCodeTemplate (string $template) {
// Set template type
- $this->setTemplateType($this->getConfigInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type'));
+ $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type'));
// Load the special template
$this->loadTemplate($template);
*/
public function loadEmailTemplate (string $template) {
// Set template type
- $this->setTemplateType($this->getConfigInstance()->getConfigEntry('email_template_type'));
+ $this->setTemplateType(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('email_template_type'));
// Load the special template
$this->loadTemplate($template);
//* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEMPLATE: value='. $value . ',name=' . $currVariable['name'] . ',index=' . $index);
// Is it a configuration key?
- if ($this->getConfigInstance()->isConfigurationEntrySet($value)) {
+ if (FrameworkBootstrap::getConfigurationInstance()->isConfigurationEntrySet($value)) {
// The value itself is a configuration entry
$this->assignConfigVariable($value);
} else {
*/
public final function compileVariables () {
// Initialize the $content array
- $validVar = $this->getConfigInstance()->getConfigEntry('tpl_valid_var');
+ $validVar = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('tpl_valid_var');
$dummy = array();
// Iterate through all general variables
*/
public function compileTemplate () {
// Get code type to make things shorter
- $codeType = $this->getConfigInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type');
+ $codeType = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type');
// We will only work with template type "code" from configuration
if (substr($this->getTemplateType(), 0, strlen($codeType)) != $codeType) {
// Abort here
- throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), $this->getConfigInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED);
+ throw new UnexpectedTemplateTypeException(array($this, $this->getTemplateType(), FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('code_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_template_type')), self::EXCEPTION_TEMPLATE_TYPE_IS_UNEXPECTED);
}
// Get the raw data.