]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/mailer/debug/class_DebugMailer.php
Continued:
[core.git] / framework / main / classes / mailer / debug / class_DebugMailer.php
index fefa2800214ce7c76e5b5b3e9ada135bfb5ab499..876f32306e94134b0b65f5ee93f739bc861d2b9d 100644 (file)
@@ -1,11 +1,15 @@
 <?php
 // Own namespace
-namespace CoreFramework\Mailer\Debug;
+namespace Org\Mxchange\CoreFramework\Mailer\Debug;
 
 // Import framework stuff
-use CoreFramework\Generic\NullPointerException;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Template\CompileableTemplate;
+use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap;
+use Org\Mxchange\CoreFramework\Generic\NullPointerException;
+use Org\Mxchange\CoreFramework\Mailer\BaseMailer;
+use Org\Mxchange\CoreFramework\Mailer\DeliverableMail;
+use Org\Mxchange\CoreFramework\Manager\Login\ManageableMember;
+use Org\Mxchange\CoreFramework\Registry\GenericRegistry;
+use Org\Mxchange\CoreFramework\Template\CompileableTemplate;
 
 /**
  * A mailer class for debugging purposes only. This class will print the
@@ -49,16 +53,13 @@ class DebugMailer extends BaseMailer implements DeliverableMail {
         * @param       $templateName                   Name of email template to set
         * @return      $mailerInstance                 An instance of this mailer class
         */
-       public static final function createDebugMailer (CompileableTemplate $templateInstance, ManageableApplication $applicationInstance, $templateName) {
+       public static final function createDebugMailer (CompileableTemplate $templateInstance, $templateName) {
                // Get a new instance
                $mailerInstance = new DebugMailer();
 
                // Set template instance
                $mailerInstance->setTemplateInstance($templateInstance);
 
-               // Set application instance
-               $mailerInstance->setApplicationInstance($applicationInstance);
-
                // Set template name
                $mailerInstance->setTemplateName($templateName);
 
@@ -117,7 +118,7 @@ class DebugMailer extends BaseMailer implements DeliverableMail {
                                $templateInstance->renderXmlContent();
 
                                // Get responce instance
-                               $responseInstance = $this->getApplicationInstance()->getResponseInstance();
+                               $responseInstance = FrameworkBootstrap::getResponseInstance();
 
                                // Transfer the data to the response
                                $templateInstance->transferToResponse($responseInstance);
@@ -171,8 +172,11 @@ class DebugMailer extends BaseMailer implements DeliverableMail {
                $templateInstance->compileTemplate();
                $templateInstance->assignTemplateWithVariable('footer', 'footer');
 
+               // Get master template name
+               $masterTemplateName = GenericRegistry::getRegistry()->getInstance('application')->buildMasterTemplateName();
+
                // Load the master template
-               $templateInstance->loadCodeTemplate($this->getApplicationInstance()->buildMasterTemplateName());
+               $templateInstance->loadCodeTemplate($masterTemplateName);
 
                // Then compile it again
                $templateInstance->compileVariables();