Some rewrites of double-quote to single-quote
authorRoland Häder <roland@mxchange.org>
Fri, 13 Mar 2009 20:26:41 +0000 (20:26 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 13 Mar 2009 20:26:41 +0000 (20:26 +0000)
inc/classes.php
inc/classes/exceptions/class_FrameworkException.php
inc/classes/main/class_BaseFrameworkSystem.php
inc/classes/middleware/compressor/class_CompressorChannel.php
inc/classes/middleware/database/class_DatabaseConnection.php
inc/database.php
inc/includes.php
inc/language.php
inc/selector.php

index 49867957408e9e578f7968efcecc7a33a7ab1355..dbeb75a49db1ce25824d4e3c1e27bcc907856e39 100644 (file)
@@ -36,19 +36,23 @@ foreach ($lowerClasses as $className) {
                ClassLoader::getInstance()->scanClassPath(sprintf("inc/classes/%s/", $className));
        } catch (PathIsNoDirectoryException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                ClassLoader::getInstance()->scanClassPath(sprintf("inc/classes/%s/", $className));
        } catch (PathIsNoDirectoryException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
-                       $className
+                       $className,
+                       $e->getMessage()
                ));
        } catch (PathIsEmptyException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                ));
        } catch (PathIsEmptyException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
-                       $className
+                       $className,
+                       $e->getMessage()
                ));
        } catch (PathReadProtectedException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                ));
        } catch (PathReadProtectedException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
-                       $className
+                       $className,
+                       $e->getMessage()
                ));
        } catch (DirPointerNotOpenedException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
                ));
        } catch (DirPointerNotOpenedException $e) {
                ApplicationEntryPoint::app_die(sprintf("[Main:] Could not load framework classes from path <span class=\"exception_data\">%s</span> for the follwing reason: <span class=\"exception_reason\">%s</span>",
-                       $className
+                       $className,
+                       $e->getMessage()
                ));
        }
 }
                ));
        }
 }
index 4c1c73a979feaf12101865619cd9ee5da1b07653..f3a42895eaf2dcba6a719a394203c5d4acfe0f58 100644 (file)
@@ -124,8 +124,9 @@ abstract class FrameworkException extends ReflectionException {
                                        if (!is_array($debug)) {
                                                $info .= $debug.", ";
                                        } // END - if
                                        if (!is_array($debug)) {
                                                $info .= $debug.", ";
                                        } // END - if
-                               } // END - if
+                               } // END - foreach
 
 
+                               // Remove last chars (commata, space)
                                $info = substr($info, 0, -2);
                        } // END - if
 
                                $info = substr($info, 0, -2);
                        } // END - if
 
@@ -147,8 +148,11 @@ abstract class FrameworkException extends ReflectionException {
                        // The message
                        $dbgMsg .= "\t at <em id=\"debug_id_".$dbgIndex."\">".$dbgIndex."</em> <em id=\"debug_file_".$dbgIndex."\">".$file."</em> (<em id=\"debug_line_".$dbgIndex."\">".$line."</em>) -&gt; ".$dbgInfo['function']."(".$info.")<br />\n";
                } // END - if
                        // The message
                        $dbgMsg .= "\t at <em id=\"debug_id_".$dbgIndex."\">".$dbgIndex."</em> <em id=\"debug_file_".$dbgIndex."\">".$file."</em> (<em id=\"debug_line_".$dbgIndex."\">".$line."</em>) -&gt; ".$dbgInfo['function']."(".$info.")<br />\n";
                } // END - if
+
+               // Add end-message
                $dbgMsg .= "Debug backtrace end<br />\n";
 
                $dbgMsg .= "Debug backtrace end<br />\n";
 
+               // Return full debug message
                return $dbgMsg;
        }
 
                return $dbgMsg;
        }
 
index 38f9f594a624792c2c8246ab5076387f4e195394..06fddbc5162c8a143d85d8279847fd1d70647298 100644 (file)
@@ -76,17 +76,17 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
        /**
         * The real class name
         */
        /**
         * The real class name
         */
-       private $realClass      = "FrameworkSystem";
+       private $realClass      = 'FrameworkSystem';
 
        /**
         * Thousands seperator
         */
 
        /**
         * Thousands seperator
         */
-       private $thousands = "."; // German
+       private $thousands = '.'; // German
 
        /**
         * Decimal seperator
         */
 
        /**
         * Decimal seperator
         */
-       private $decimals  = ","; // German
+       private $decimals  = ','; // German
 
        /***********************
         * Exception codes.... *
 
        /***********************
         * Exception codes.... *
@@ -161,20 +161,19 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
         *---------------------------------------------------------------------*
         */
        private $systemClasses = array(
         *---------------------------------------------------------------------*
         */
        private $systemClasses = array(
-               "DebugMiddleware",                              // Debug middleware output sub-system
-               "Registry",                                             // Object registry
-               "ObjectFactory",                                // Object factory
-               "DebugWebOutput",                               // Debug web output sub-system
-               "WebOutput",                                    // Web output sub-system
-               "CompressorChannel",                    // Compressor sub-system
-               "DebugConsoleOutput",                   // Debug console output sub-system
-               "DebugErrorLogOutput",                  // Debug error_log() output sub-system
-               "FrameworkDirectoryPointer",    // Directory handler sub-system
-               "NullCompressor",                               // Null compressor
-               "Bzip2Compressor",                              // BZIP2 compressor
-               "GzipCompressor",                               // GZIP compressor
+               'DebugMiddleware',                              // Debug middleware output sub-system
+               'Registry',                                             // Object registry
+               'ObjectFactory',                                // Object factory
+               'DebugWebOutput',                               // Debug web output sub-system
+               'WebOutput',                                    // Web output sub-system
+               'CompressorChannel',                    // Compressor sub-system
+               'DebugConsoleOutput',                   // Debug console output sub-system
+               'DebugErrorLogOutput',                  // Debug error_log() output sub-system
+               'FrameworkDirectoryPointer',    // Directory handler sub-system
+               'NullCompressor',                               // Null compressor
+               'Bzip2Compressor',                              // BZIP2 compressor
+               'GzipCompressor',                               // GZIP compressor
        );
        );
-
        /**
         * Protected super constructor
         *
        /**
         * Protected super constructor
         *
@@ -280,10 +279,10 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                        $this->setWebOutputInstance($outputInstance);
 
                        // Set the compressor channel
                        $this->setWebOutputInstance($outputInstance);
 
                        // Set the compressor channel
-                       $this->setCompressorChannel(CompressorChannel::createCompressorChannel(sprintf("%s%s",
-                               $this->getConfigInstance()->readConfig('base_path'),
+                       $this->setCompressorChannel(CompressorChannel::createCompressorChannel(
+                               $this->getConfigInstance()->readConfig('base_path').
                                $this->getConfigInstance()->readConfig('compressor_base_path')
                                $this->getConfigInstance()->readConfig('compressor_base_path')
-                       )));
+                       ));
 
                        // Initialization done! :D
                        Registry::isInitialized('OK');
 
                        // Initialization done! :D
                        Registry::isInitialized('OK');
index 7a727156a5106e2251e6890779ea62e5c60baa8f..567c4f44d8e479aad26fd58119c38e6400d1b014 100644 (file)
@@ -59,9 +59,9 @@ class CompressorChannel extends BaseMiddleware implements Registerable {
                        $dirPointer = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($baseDir);
 
                        // Read all directories but no sub directories
                        $dirPointer = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($baseDir);
 
                        // Read all directories but no sub directories
-                       while ($dir = $dirPointer->readDirectoryExcept(array("..", ".", ".htaccess", ".svn"))) {
+                       while ($dir = $dirPointer->readDirectoryExcept(array('..', '.', '.htaccess', '.svn'))) {
                                // Is this a class file?
                                // Is this a class file?
-                               if ((substr($dir, 0, 6) == "class_") && (substr($dir, -4, 4) == ".php")) {
+                               if ((substr($dir, 0, 6) == 'class_') && (substr($dir, -4, 4) == '.php')) {
                                        // Get the compressor's name. That's why you must name
                                        // your files like your classes and also that's why you
                                        // must keep on class in one file.
                                        // Get the compressor's name. That's why you must name
                                        // your files like your classes and also that's why you
                                        // must keep on class in one file.
index 420421fd4f1ecb461e694153f6d24302206ed195..f94e20e4d7587863083a872de58349d483b0084d 100644 (file)
@@ -72,7 +72,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
        }
 
        // Public setter for database connection
        }
 
        // Public setter for database connection
-       public final function setConnectionData ($login, $pass, $dbase, $host="localhost") {
+       public final function setConnectionData ($login, $pass, $dbase, $host='localhost') {
                // Transfer connection data
                $this->connectData['login'] = (string) $login;
                $this->connectData['pass']  = (string) $pass;
                // Transfer connection data
                $this->connectData['login'] = (string) $login;
                $this->connectData['pass']  = (string) $pass;
index f62ab895e58ef6f5d93f924ab8821ead441e0fd6..30792197135d5d46a6e70f4d9112128bbc285e8f 100644 (file)
@@ -80,13 +80,5 @@ try {
 // Is the app variable there and valid?
 if (is_object($app)) $app->setDatabaseInstance($db);
 
 // Is the app variable there and valid?
 if (is_object($app)) $app->setDatabaseInstance($db);
 
-// Datenbankobjekt debuggen
-if (defined('DEBUG_DATABASE_OBJ')) {
-       DebugMiddleware::getInstance()->output(sprintf("The database sub-system does now look like this:<br />
-<pre>%s</pre>\n",
-               print_r($db, true)
-       ));
-}
-
 // [EOF]
 ?>
 // [EOF]
 ?>
index 367399ad841f1c9d000a766d9bd8bb74f5d1c235..61e8bb971e5f0cce769619492a337cd0e9bcff84 100644 (file)
@@ -62,7 +62,7 @@ $application = preg_replace('/([^a-z0-9_-])+/i', '', $application);
 $cfg->setConfigEntry('app_name', $application);
 
 // Register auto-load function with the SPL
 $cfg->setConfigEntry('app_name', $application);
 
 // Register auto-load function with the SPL
-spl_autoload_register("ClassLoader::autoLoad");
+spl_autoload_register('ClassLoader::autoLoad');
 
 /**
  * Is the devel package included?
 
 /**
  * Is the devel package included?
index 8fe75091b0cb12b8cf73357debfffda7fa867242..7f63099c00b277fe319d48e24b60515d92479962 100644 (file)
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 try {
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 try {
-       $lang = LanguageSystem::createLanguageSystem(sprintf("%s%s",
-               $cfg->readConfig('base_path'),
+       $lang = LanguageSystem::createLanguageSystem(
+               $cfg->readConfig('base_path').
                FrameworkConfiguration::getInstance()->readConfig('lang_base_path')
                FrameworkConfiguration::getInstance()->readConfig('lang_base_path')
-       ));
+       );
 } catch (LanguagePathIsEmptyException $e) {
        ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
 } catch (LanguagePathIsEmptyException $e) {
        ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
                $e->getMessage()
index 40789c0c97a58cdf1437864218a24042a359c472..96ed550565c366e5b7bcb965e8b06162236617f9 100644 (file)
@@ -28,19 +28,19 @@ $cfg = FrameworkConfiguration::getInstance();
 // Try to load these includes in the given order
 $configAppIncludes = array(
        sprintf("class_%s", $cfg->readConfig('app_helper_class')), // The ApplicationHelper class
 // Try to load these includes in the given order
 $configAppIncludes = array(
        sprintf("class_%s", $cfg->readConfig('app_helper_class')), // The ApplicationHelper class
-       "config",               // The application's own configuration
-       "data",                 // Application data
-       "init",                 // The application initializer
-       "loader",               // The application's class loader
-       "debug",                // Some debugging stuff
-       "exceptions",   // The application's own exception handler
-       "starter",              // The application starter (calls entryPoint(), etc.)
+       'config',               // The application's own configuration
+       'data',                 // Application data
+       'init',                 // The application initializer
+       'loader',               // The application's class loader
+       'debug',                // Some debugging stuff
+       'exceptions',   // The application's own exception handler
+       'starter',              // The application starter (calls entryPoint(), etc.)
 );
 
 // Load them all (try only)
 foreach ($configAppIncludes as $inc) {
        // Skip starter in test mode
 );
 
 // Load them all (try only)
 foreach ($configAppIncludes as $inc) {
        // Skip starter in test mode
-       if (($inc == "starter") && (defined('TEST'))) {
+       if (($inc == 'starter') && (defined('TEST'))) {
                // Skip it here
                continue;
        }
                // Skip it here
                continue;
        }