/**
* The own template engine for loading caching and sending out images
*
- * @author Roland Haeder <webmaster@ship-simu.org>
+ * @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team
* @license GNU GPL 3.0 or any newer version
- * @link http://www.ship-simu.org
+ * @link http://www.shipsimu.org
* @todo This template engine does not make use of setTemplateType()
*
* This program is free software: you can redistribute it and/or modify
/**
* Mailer instance
*/
- private $mailerInstance = null;
+ private $mailerInstance = NULL;
/**
* Current main node
/**
* Creates an instance of the class TemplateEngine and prepares it for usage
*
- * @param $appInstance A manageable application
- * @return $templateInstance An instance of TemplateEngine
+ * @return $templateInstance An instance of TemplateEngine
* @throws BasePathIsEmptyException If the provided $templateBasePath is empty
* @throws InvalidBasePathStringException If $templateBasePath is no string
* @throws BasePathIsNoDirectoryException If $templateBasePath is no
* @throws BasePathReadProtectedException If $templateBasePath is
* read-protected
*/
- public static final function createMailTemplateEngine (ManageableApplication $appInstance) {
+ public static final function createMailTemplateEngine () {
// Get a new instance
$templateInstance = new MailTemplateEngine();
+ // Get the application instance from registry
+ $applicationInstance = Registry::getRegistry()->getInstance('app');
+
// Determine base path
- $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $appInstance->getRequestInstance()->getRequestElement('app') . '/';
+ $templateBasePath = $templateInstance->getConfigInstance()->getConfigEntry('application_base_path') . $applicationInstance->getRequestInstance()->getRequestElement('app') . '/';
// Is the base path valid?
if (empty($templateBasePath)) {
* @return void
* @throws InvalidXmlNodeException If an unknown/invalid XML node name was found
*/
- protected function startElement ($resource, $element, array $attributes) {
+ public function startElement ($resource, $element, array $attributes) {
// Initial method name which will never be called...
$methodName = 'initEmail';
* @return void
* @throws XmlNodeMismatchException If current main node mismatches the closing one
*/
- protected function endElement ($resource, $nodeName) {
+ public function finishElement ($resource, $nodeName) {
// Make all lower-case
$nodeName = strtolower($nodeName);
* @param $characters Characters to handle
* @return void
*/
- protected function characterHandler ($resource, $characters) {
+ public function characterHandler ($resource, $characters) {
// Trim all spaces away
$characters = trim($characters);
// Is this string empty?
if (empty($characters)) {
// Then skip it silently
- return false;
+ return;
} // END - if
// Add the message now
/**
* Setter for subject line property
*
- * @param $subjectLine Subject line to set in email
* @return void
*/
- private function setEmailPropertySubjectLine ($subjectLine) {
- // Set the template variable
- $this->assignVariable('subject', $subjectLine);
+ private function setEmailPropertySubjectLine () {
+ // Empty for now
}
/**
public function getMailCacheFqfn () {
// Initialize FQFN
$fqfn = '';
- $this->debugBackTrace();
+ $this->debugBackTrace('Unfinished area!');
// Return it
return $fqfn;