]> git.mxchange.org Git - mailer.git/commitdiff
Name change applied
authorRoland Häder <roland@mxchange.org>
Mon, 7 Dec 2009 22:43:03 +0000 (22:43 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 7 Dec 2009 22:43:03 +0000 (22:43 +0000)
25 files changed:
.gitattributes
application/mailer/.htaccess [new file with mode: 0644]
application/mailer/class_ApplicationHelper.php [new file with mode: 0644]
application/mailer/config.php [new file with mode: 0644]
application/mailer/data.php [new file with mode: 0644]
application/mailer/debug.php [new file with mode: 0644]
application/mailer/exceptions.php [new file with mode: 0644]
application/mailer/exceptions/.htaccess [new file with mode: 0644]
application/mailer/init.php [new file with mode: 0644]
application/mailer/interfaces/.htaccess [new file with mode: 0644]
application/mailer/loader.php [new file with mode: 0644]
application/mailer/main/.htaccess [new file with mode: 0644]
application/mailer/starter.php [new file with mode: 0644]
application/mailer/templates/.htaccess [new file with mode: 0644]
application/mailer/templates/de/.htaccess [new file with mode: 0644]
application/mailer/templates/de/code/.htaccess [new file with mode: 0644]
application/mailer/templates/de/code/emergency_exit.ctp [new file with mode: 0644]
application/mailer/templates/de/code/footer_msg.ctp [new file with mode: 0644]
application/mxchange/class_ApplicationHelper.php
application/mxchange/data.php
application/mxchange/debug.php
application/mxchange/exceptions.php
application/mxchange/init.php
application/mxchange/loader.php
application/mxchange/starter.php

index b345ae7d193282a30cb6759f3deb3f4eddb643ed..083f227df71e88d9923ac81dc975b7ce4d32fdce 100644 (file)
@@ -1,6 +1,23 @@
 * text=auto !eol
 /Doxyfile -text
 application/.htaccess -text
+application/mailer/.htaccess -text
+application/mailer/class_ApplicationHelper.php -text
+application/mailer/config.php -text
+application/mailer/data.php -text
+application/mailer/debug.php -text
+application/mailer/exceptions.php -text
+application/mailer/exceptions/.htaccess -text
+application/mailer/init.php -text
+application/mailer/interfaces/.htaccess -text
+application/mailer/loader.php -text
+application/mailer/main/.htaccess -text
+application/mailer/starter.php -text
+application/mailer/templates/.htaccess -text
+application/mailer/templates/de/.htaccess -text
+application/mailer/templates/de/code/.htaccess -text
+application/mailer/templates/de/code/emergency_exit.ctp -text
+application/mailer/templates/de/code/footer_msg.ctp -text
 application/mxchange/.htaccess -text
 application/mxchange/class_ApplicationHelper.php -text
 application/mxchange/config.php -text
diff --git a/application/mailer/.htaccess b/application/mailer/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/class_ApplicationHelper.php b/application/mailer/class_ApplicationHelper.php
new file mode 100644 (file)
index 0000000..7f34815
--- /dev/null
@@ -0,0 +1,255 @@
+<?php
+/**
+ * A class holding general data about the application and some methods for
+ * the management including the entry point.
+ *
+ * E.g.:
+ *
+ * index.php?app=my_app
+ *
+ * You need to create a folder in the folder "application" named "my_app"
+ * (without the quotes) and create a include file called
+ * class_ApplicationHelper.php. You have to write the same class for your
+ * application and implement the same interface called ManageableApplication
+ * because this class include file will be searched for.
+ *
+ * It is good when you avoid more GET parameters to keep URLs short and sweet.
+ * But sometimes you need some GET paramerers e.g. for your imprint or info page
+ * or other linked pages which you have to create and state some informations.
+ *
+ * Please remember that this include file is being loaded *before* the class
+ * loader is loading classes from "exceptions", "interfaces" and "main"!
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class ApplicationHelper extends BaseApplication implements ManageableApplication, Registerable {
+       /**
+        * The version number of this application
+        */
+       private $appVersion = "";
+
+       /**
+        * The human-readable name for this application
+        */
+       private $appName = "";
+
+       /**
+        * The short uni*-like name for this application
+        */
+       private $shortName = "";
+
+       /**
+        * An instance of a controller
+        */
+       private $controllerInstance = null;
+
+       /**
+        * An instance of this class
+        */
+       private static $thisInstance = null;
+
+       /**
+        * Protected constructor
+        *
+        * @return      void
+        */
+       protected function __construct () {
+               // Call parent constructor
+               parent::__construct(__CLASS__);
+       }
+
+       /**
+        * Getter for an instance of this class
+        *
+        * @return      $thisInstance           An instance of this class
+        */
+       public final static function getInstance () {
+               // Is the instance there?
+               if (is_null(self::$thisInstance)) {
+                       self::$thisInstance = new ApplicationHelper();
+               }
+
+               // Return the instance
+               return self::$thisInstance;
+       }
+
+       /**
+        * Getter for the version number
+        *
+        * @return      $appVersion             The application's version number
+        */
+       public final function getAppVersion () {
+               return $this->appVersion;
+       }
+
+       /**
+        * Setter for the version number
+        *
+        * @param       $appVersion             The application's version number
+        * @return      void
+        */
+       public final function setAppVersion ($appVersion) {
+               // Cast and set it
+               $appVersion = (string) $appVersion;
+               $this->appVersion = $appVersion;
+       }
+
+       /**
+        * Getter for human-readable name
+        *
+        * @return      $appName        The application's human-readable name
+        */
+       public final function getAppName () {
+               return $this->appName;
+       }
+
+       /**
+        * Setter for human-readable name
+        *
+        * @param       $appName        The application's human-readable name
+        * @return      void
+        */
+       public final function setAppName ($appName) {
+               // Cast and set it
+               $appName = (string) $appName;
+               $this->appName = $appName;
+       }
+
+       /**
+        * Getter for short uni*-like name
+        *
+        * @return      $shortName      The application's short uni*-like name
+        */
+       public final function getAppShortName () {
+               return $this->shortName;
+       }
+
+       /**
+        * Setter for short uni*-like name
+        *
+        * @param       $shortName      The application's short uni*-like name
+        * @return      void
+        */
+       public final function setAppShortName ($shortName) {
+               // Cast and set it
+               $shortName = (string) $shortName;
+               $this->shortName = $shortName;
+       }
+
+       /**
+        * Builds the master template's name
+        *
+        * @return      $masterTemplateName             Name of the master template
+        */
+       public function buildMasterTemplateName () {
+               // Get short name and add suffix
+               $masterTemplateName = str_replace("-", "", $this->getAppShortName()) . "_main";
+
+               // Return it
+               return $masterTemplateName;
+       }
+
+       /**
+        * Launches the admin area
+        *
+        * @return      void
+        */
+       public final function entryPoint () {
+               // Create a new request object
+               $requestInstance = ObjectFactory::createObjectByName('HttpRequest');
+
+               // Remember request instance here
+               $this->setRequestInstance($requestInstance);
+
+               // Default response is HTTP (HTML page) and type is 'Web'
+               $response = 'http';
+               $responseType = 'web';
+
+               // Do we have another response?
+               if ($requestInstance->isRequestElementSet('request')) {
+                       // Then use it
+                       $response = strtolower($requestInstance->getRequestElement('request'));
+                       $responseType = $response;
+               } // END - if
+
+               // ... and a new response object
+               $responseClass = sprintf("%sResponse", $this->convertToClassName($response));
+               $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this));
+
+               // Remember response instance here
+               $this->setResponseInstance($responseInstance);
+
+               // Get the parameter from the request
+               $commandName = $requestInstance->getRequestElement('page');
+
+               // If it is null then get default command
+               if (is_null($commandName)) {
+                       // Get default command
+                       $commandName = $responseInstance->getDefaultCommand();
+
+                       // Set it in request
+                       $requestInstance->setRequestElement('page', $commandName);
+               } // END - if
+
+               // Get a resolver
+               $resolverClass = sprintf("%sControllerResolver", $this->convertToClassName($responseType));
+               $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this));
+
+               // Get a controller instance as well
+               $this->controllerInstance = $resolverInstance->resolveController();
+
+               // Get a web output class
+               $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($this));
+
+               // Set it in this application
+               $this->setWebOutputInstance($outputInstance);
+
+               // Handle the request
+               $this->controllerInstance->handleRequest($requestInstance, $responseInstance);
+       }
+
+       /**
+        * Handle the indexed array of fatal messages and puts them out in an
+        * acceptable fasion
+        *
+        * @param       $messageList    An array of fatal messages
+        * @return      void
+        */
+       public function handleFatalMessages (array $messageList) {
+               // Walk through all messages
+               foreach ($messageList as $message) {
+                       print("MSG:".$message."<br />\n");
+               } // END - if
+       }
+
+       /**
+        * Assigns application-depending data
+        *
+        * @param       $templateInstance       An instance of a template engine
+        * @return      void
+        */
+       public function assignExtraTemplateData (CompileableTemplate $templateInstance) {
+               // Assign charset
+               $templateInstance->assignConfigVariable('header_charset');
+       }
+}
+
+// [EOF]
+?>
diff --git a/application/mailer/config.php b/application/mailer/config.php
new file mode 100644 (file)
index 0000000..d5cedbd
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Overwrite some configuration entries here
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// [EOF]
+?>
diff --git a/application/mailer/data.php b/application/mailer/data.php
new file mode 100644 (file)
index 0000000..b9b0fdc
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Application data
+ *
+ * Please remember that this include file is being loaded *before* the class
+ * loader is loading classes from "exceptions", "interfaces" and "main"!
+ *
+ * You can prevent adding this application to the selector by uncommenting the
+ * following line:
+ *
+ * if ((isset($this)) && (is_object($this)) && ($this->isClass("ApplicationSelector"))) { return; }
+ *
+ * isset() is required to prevent a warning and is_object() is highly required
+ * when the application itself is requested in URL (hint: index.php?app=your_app)
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Get config instance
+$cfg = FrameworkConfiguration::getInstance();
+
+// Get an instance of the helper
+$app = call_user_func_array(
+       array($cfg->getConfigEntry('app_helper_class'), 'getInstance'),
+       array()
+);
+
+// Set application name and version
+$app->setAppName('Mailer-Project');
+$app->setAppVersion('0.3.0');
+$app->setAppShortName('mailer');
+
+// [EOF]
+?>
diff --git a/application/mailer/debug.php b/application/mailer/debug.php
new file mode 100644 (file)
index 0000000..0ba635a
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Some debugging stuff for this application
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// [EOF]
+?>
diff --git a/application/mailer/exceptions.php b/application/mailer/exceptions.php
new file mode 100644 (file)
index 0000000..bb3f8aa
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+/**
+ * The exception handler for this application
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Our own exception handler
+function __exceptionHandler (FrameworkException $e) {
+       // Call the app_die() method
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> (<span class=\"app_short_name\">%s</span>) has terminated due to a thrown exception: <span class=\"exception_name\">%s</span> <span class=\"exception_number\">[%s]</span>: <span class=\"debug_exception\">%s</span> Backtrace: <div class=\"debug_backtrace\">%s</div>",
+               ApplicationHelper::getInstance()->getAppName(),
+               ApplicationHelper::getInstance()->getAppShortName(),
+               $e->__toString(),
+               $e->getHexCode(),
+               $e->getMessage(),
+               $e->getPrintableBackTrace()
+       ),
+               $e->getHexCode(),
+               $e->getExtraData()
+       );
+} // END - function
+
+// Set the new handler
+set_exception_handler('__exceptionHandler');
+
+// Error handler
+function __errorHandler ($errno, $errstr, $errfile, $errline, array $errcontext) {
+       // Construct the message
+       $message = sprintf("File: <span class=\"debug_file\">%s</span>, Line: <span class=\"debug_line\">%s</span>, Code: <span class=\"debug_code\">%s</span>, Message: <span class=\"debug_message\">%s</span>",
+               basename($errfile),
+               $errline,
+               $errno,
+               $errstr
+       );
+
+       // Throw an exception here
+       throw new FatalErrorException($message, BaseFrameworkSystem::EXCEPTION_FATAL_ERROR);
+} // END - function
+
+// Set error handler
+set_error_handler('__errorHandler');
+
+// Assertion handler
+function __assertHandler ($file, $line, $code) {
+       // Empty code?
+       if ($code === "") $code = "<em>Unknown</em>";
+
+       // Create message
+       $message = sprintf("File: <span class=\"debug_file\">%s</span>, Line: <span class=\"debug_line\">%s</span>, Code: <span class=\"debug_code\">%s</span>",
+               basename($file),
+               $line,
+               $code
+       );
+
+       // Throw an exception here
+       throw new AssertionException($message, BaseFrameworkSystem::EXCEPTION_ASSERTION_FAILED);
+} // END - function
+
+// Init assert handling
+assert_options(ASSERT_ACTIVE,     1);
+assert_options(ASSERT_WARNING,    0);
+assert_options(ASSERT_BAIL,       0);
+assert_options(ASSERT_QUIET_EVAL, 0);
+assert_options(ASSERT_CALLBACK,   '__assertHandler');
+
+// [EOF]
+?>
diff --git a/application/mailer/exceptions/.htaccess b/application/mailer/exceptions/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/init.php b/application/mailer/init.php
new file mode 100644 (file)
index 0000000..c9790dc
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Application initializer
+ *
+ * Please remember that this include file is being loaded *before* the class
+ * loader is loading classes from "exceptions", "interfaces" and "main"!
+ *
+ * You can prevent adding this application to the selector by uncommenting the
+ * following line:
+ *
+ * if ((isset($this)) && (is_object($this)) && ($this->isClass("ApplicationSelector"))) { return; }
+ *
+ * isset() is required to prevent a warning and is_object() is highly required
+ * when the application itself is requested in URL (hint: index.php?app=your_app)
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license    GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Get config instance
+$cfg = FrameworkConfiguration::getInstance();
+
+// Initialize output system
+require($cfg->getConfigEntry('base_path') . 'inc/output.php');
+
+// Initialize file i/o system
+require($cfg->getConfigEntry('base_path') . 'inc/file_io.php');
+
+// Include the language sub-system
+require($cfg->getConfigEntry('base_path') . 'inc/language.php');
+
+// This application needs a database connection then we have to simply include
+// the inc/database.php script
+require($cfg->getConfigEntry('base_path') . 'inc/database.php');
+
+// [EOF]
+?>
diff --git a/application/mailer/interfaces/.htaccess b/application/mailer/interfaces/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/loader.php b/application/mailer/loader.php
new file mode 100644 (file)
index 0000000..f5c1443
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * A specialized class loader for this class
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Get config instance
+$cfg = FrameworkConfiguration::getInstance();
+
+// Load all classes for the application
+foreach ($lowerClasses as $className) {
+       // Load the application classes
+       ClassLoader::getInstance()->scanClassPath(sprintf("%s/%s/%s", $cfg->getConfigEntry('application_path'), $cfg->getConfigEntry('app_name'), $className));
+} // END - if
+
+// Clean up the global namespace
+unset($lowerClasses);
+unset($className);
+
+// [EOF]
+?>
diff --git a/application/mailer/main/.htaccess b/application/mailer/main/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/starter.php b/application/mailer/starter.php
new file mode 100644 (file)
index 0000000..1480600
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * The application launcher
+ *
+ * @author             Roland Haeder <webmaster@mxchange.org>
+ * @version            0.0.0
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
+ * @license            GNU GPL 3.0 or any newer version
+ * @link               http://www.mxchange.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Is there an application helper instance? We need the method main() for
+// maining the application
+$app = call_user_func_array(array(FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class'), 'getInstance'), array());
+
+// Some sanity checks
+if ((empty($app)) || (is_null($app))) {
+       // Something went wrong!
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the helper class <span class=\"class_name\">%s</span> is not loaded.",
+               $application,
+               FrameworkConfiguration::getInstance()->getConfigEntry('app_helper_class')
+       ));
+} elseif (!is_object($app)) {
+       // No object!
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because &#39;app&#39; is not an object.",
+               $application
+       ));
+} elseif (!method_exists($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method'))) {
+       // Method not found!
+       ApplicationEntryPoint::app_die(sprintf("[Main:] The application <span class=\"app_name\">%s</span> could not be launched because the method <span class=\"method_name\">%s</span> is missing.",
+               $application,
+               FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')
+       ));
+}
+
+// Call user function
+call_user_func_array(array($app, FrameworkConfiguration::getInstance()->getConfigEntry('entry_method')), array());
+
+// [EOF]
+?>
diff --git a/application/mailer/templates/.htaccess b/application/mailer/templates/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/templates/de/.htaccess b/application/mailer/templates/de/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/templates/de/code/.htaccess b/application/mailer/templates/de/code/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/mailer/templates/de/code/emergency_exit.ctp b/application/mailer/templates/de/code/emergency_exit.ctp
new file mode 100644 (file)
index 0000000..e974daf
--- /dev/null
@@ -0,0 +1,29 @@
+{?header:title="Problem in application framework detected!"?}
+
+<div id="emergency_message">
+       $content[message]
+</div>
+
+<div id="emergency_backtrace">
+       <div id="backtrace_header">
+               File inclusion backtrace:
+       </div>
+       <div id="backtrace_content">
+               $content[backtrace]
+       </div>
+</div>
+
+<div id="stats_box">
+       <div id="stats_header">
+               Statistics
+       </div>
+       <div id="stats_objects">
+               Total objects: $content[total_objects]
+       </div>
+       <div id="stats_includes">
+               Loaded class files: $content[total_includes]
+               <span class="hint">(Including exception and interfaces.)</span>
+       </div>
+</div>
+
+{?footer_msg:footer_msg="Please contact the support and supply the full above message, if you think you are not qualified to fix this problem."?}
diff --git a/application/mailer/templates/de/code/footer_msg.ctp b/application/mailer/templates/de/code/footer_msg.ctp
new file mode 100644 (file)
index 0000000..fb1de36
--- /dev/null
@@ -0,0 +1,8 @@
+       <div id="footer_message">
+               $content[footer_msg]
+       </div>
+
+</div> <!-- masterbox //-->
+
+</body>
+</html>
index 538829ba5d27b5d9f6ac6575938ab0cfffbd0179..7f34815da9d6b8be97b4abdd2eb684c2afea8b91 100644 (file)
@@ -22,7 +22,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *
index be9f0090682aaecc3338fd9caca469894d25cb79..b9b0fdcefa3b3bb86ce9fef0e0343c9644be33a4 100644 (file)
@@ -15,7 +15,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *
@@ -43,9 +43,9 @@ $app = call_user_func_array(
 );
 
 // Set application name and version
-$app->setAppName("MXChange Mail-Exchange");
-$app->setAppVersion("0.3.0");
-$app->setAppShortName("mxchange");
+$app->setAppName('Mailer-Project');
+$app->setAppVersion('0.3.0');
+$app->setAppShortName('mailer');
 
 // [EOF]
 ?>
index 2639a237a07cb87dc4c44370ab87e0978745383d..0ba635aeb0e029eadfccb814164d2a0ea448044b 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *
index 910cea806527f8529544dc258fb028ee3b5c0269..bb3f8aa3df1531cdfc1142633f5dd51e84f02b3f 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *
index 21dcbf956fe64bafd1cd445037c948f169e52b66..c9790dc5d6042d674a54e39b6894e17c792b6830 100644 (file)
@@ -15,7 +15,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license    GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *
index c499a19335e1b8c224b12dbeb16975b2cc178e3e..f5c144306d588ac03c839535700d6a9cf0174410 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *
index 5a447f0b81dc8654e2f770e8399fa60b5ccf74b6..14806008a4370a81ccc19cbfc6f84d97985d0f41 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@mxchange.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 MXChange Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Mailer Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.mxchange.org
  *