Update version.php to 3.3.0
[isso.git] / App.php
diff --git a/App.php b/App.php
index d894a7b7e480fa475b232bbe96a8d583f0630c99..98b04bdb0c50508403044306dba2e16a12d1e53b 100644 (file)
--- a/App.php
+++ b/App.php
@@ -2,7 +2,7 @@
 /*=====================================================================*\
 || ###################################################################
 || # Blue Static ISSO Framework
-|| # Copyright (c)2005-2008 Blue Static
+|| # Copyright (c)2005-2009 Blue Static
 || #
 || # 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
 \*=====================================================================*/
 
 /**
-* ISSO Application Root (App.php)
-*
-* @package     ISSO
-*/
+ * ISSO Application Root (App.php)
+ *
+ * @package    ISSO
+ */
 
 // we need PHP 5.2.0 to run
 if (!function_exists('array_fill_keys'))
@@ -36,11 +36,11 @@ if (!function_exists('array_fill_keys'))
 if ((bool)ini_get('register_globals') === true)
 {
        $superglobals = array('_GET', '_COOKIE', '_FILES', '_POST', '_SERVER', '_ENV');
-       foreach ($superglobals AS $global)
+       foreach ($superglobals as $global)
        {
                if (is_array(${$global}))
                {
-                       foreach (${$global} AS $_key => $_val)
+                       foreach (${$global} as $_key => $_val)
                        {
                                if (isset(${$_key}))
                                {
@@ -51,33 +51,34 @@ if ((bool)ini_get('register_globals') === true)
        }
 }
 
-require_once(ISSO . '/Functions.php');
+require_once ISSO . '/ExceptionHandler.php';
+set_exception_handler(array('BSExceptionHandler', 'handle'));
 
 /**
-* Application Class
-*
-* This is an ISSO application class. It holds all of the ISSO system variables as well
-* as serving as an object registry that is avaliable in the global scope to prevent
-* globalization of variables. There can only be one instance of this existing
-* at any given time.
-*
-* @author              Blue Static
-* @copyright   Copyright (c)2005 - 2008, Blue Static
-* @package             ISSO
-* 
-*/
+ * Application Class
+ *
+ * This is an ISSO application class. It holds all of the ISSO system variables as well
+ * as serving as an object registry that is avaliable in the global scope to prevent
+ * globalization of variables. There can only be one instance of this existing
+ * at any given time.
+ *
+ * @author             Blue Static
+ * @copyright  Copyright (c)2005 - 2009, Blue Static
+ * @package            ISSO
+ 
+ */
 class BSApp
 {
        /**
-       * Debug mode?
-       * @var  bool
-       */
+        * Debug mode?
+        * @var bool
+        */
        private static $debug = false;
        
        /**
-       * An array of debug messages
-       * @var  array
-       */
+        * An array of debug messages
+        * @var array
+        */
        private static $debugInfo = array();
        
        /**
@@ -86,35 +87,32 @@ class BSApp
        private function __construct()
        {}
        
-       // ###################################################################
        /**
-       * Sets the debug state
-       *
-       * @param        bool    Debug mode on?
-       */
+        * Sets the debug state
+        *
+        * @param       bool    Debug mode on?
+        */
        public static function set_debug($debug)
        {
                self::$debug = $debug;
        }
        
-       // ###################################################################
        /**
-       * Gets the debug mode state
-       *
-       * @return       bool    Debug mode on?
-       */
+        * Gets the debug mode state
+        *
+        * @return      bool    Debug mode on?
+        */
        public static function get_debug()
        {
                return self::$debug;
        }
        
-       // ###################################################################
        /**
-       * Adds a debug message to the array. This only works when debug mode
-       * is enabled.
-       *
-       * @param        string  Debug message
-       */
+        * Adds a debug message to the array. This only works when debug mode
+        * is enabled.
+        *
+        * @param       string  Debug message
+        */
        public static function debug($msg)
        {
                if (self::$debug)
@@ -123,16 +121,15 @@ class BSApp
                }
        }
        
-       // ###################################################################
        /**
-       * Returns a <select> menu of all the debug notices
-       *
-       * @return       string  Debug list
-       */
+        * Returns a <select> menu of all the debug notices
+        *
+        * @return      string  Debug list
+        */
        public static function get_debug_list()
        {
                $output = '<select><option>Debug Notices (' . sizeof(self::$debugInfo) . ')</option>';
-               foreach (self::$debugInfo AS $notice)
+               foreach (self::$debugInfo as $notice)
                {
                        $output .= "<option>--- $notice</option>";
                }