selfInstance is better
[mailer.git] / application / mailer / class_ApplicationHelper.php
index 7f34815da9d6b8be97b4abdd2eb684c2afea8b91..ed334f936c063906fd94aab2501ca87c95a12ee4 100644 (file)
@@ -63,7 +63,7 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
        /**
         * An instance of this class
         */
-       private static $thisInstance = null;
+       private static $selfInstance = null;
 
        /**
         * Protected constructor
@@ -78,16 +78,16 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
        /**
         * Getter for an instance of this class
         *
-        * @return      $thisInstance           An instance of this class
+        * @return      $selfInstance   An instance of this class
         */
-       public final static function getInstance () {
+       public static final function getInstance () {
                // Is the instance there?
-               if (is_null(self::$thisInstance)) {
-                       self::$thisInstance = new ApplicationHelper();
-               }
+               if (is_null(self::$selfInstance)) {
+                       self::$selfInstance = new ApplicationHelper();
+               } // END - if
 
                // Return the instance
-               return self::$thisInstance;
+               return self::$selfInstance;
        }
 
        /**
@@ -172,6 +172,9 @@ class ApplicationHelper extends BaseApplication implements ManageableApplication
         * @return      void
         */
        public final function entryPoint () {
+               // Set this application in registry
+               Registry::getRegistry()->addInstance('app', $this);
+
                // Create a new request object
                $requestInstance = ObjectFactory::createObjectByName('HttpRequest');