From: Roland Häder Date: Fri, 13 Mar 2009 21:07:30 +0000 (+0000) Subject: More quotes rewritten X-Git-Url: https://git.mxchange.org/?p=core.git;a=commitdiff_plain;h=7a41f3cbb6640f18a4205ef367de6bf050020ed6;hp=2854583acb819fa091c3e0405e50f5e2139ba9b7 More quotes rewritten --- diff --git a/inc/classes.php b/inc/classes.php index 9d1af75d..6be9fab0 100644 --- a/inc/classes.php +++ b/inc/classes.php @@ -23,16 +23,16 @@ // Lower framework classes $lowerClasses = array( - 0 => 'exceptions', // Exceptions - 1 => 'interfaces', // Interfaces - 2 => 'main', // General main classes - 3 => 'middleware' // The middleware + 'exceptions', // Exceptions + 'interfaces', // Interfaces + 'main', // General main classes + 'middleware' // The middleware ); // Load all classes foreach ($lowerClasses as $className) { // Try to load the framework classes - ClassLoader::getInstance()->scanClassPath(sprintf("inc/classes/%s/", $className)); + ClassLoader::getInstance()->scanClassPath('inc/classes/' . $className . '/'); } // END - foreach // Clean up the global namespace diff --git a/inc/classes/middleware/database/class_DatabaseConnection.php b/inc/classes/middleware/database/class_DatabaseConnection.php index f94e20e4..20a1e14d 100644 --- a/inc/classes/middleware/database/class_DatabaseConnection.php +++ b/inc/classes/middleware/database/class_DatabaseConnection.php @@ -108,10 +108,10 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re } /** - * Runs a "select" statement on the database layer with given table name + * Runs a 'select' statement on the database layer with given table name * and criteria. If this doesn't fail the result will be returned * - * @param $tableName Name of the "table" we shall query + * @param $tableName Name of the 'table' we shall query * @param $criteriaInstance An instance of a Criteria class * @return $result The result as an array */ @@ -120,7 +120,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re $this->dbLayer->connectToDatabase(); // Get result from query - $result = $this->dbLayer->querySelect("array", $tableName, $criteriaInstance); + $result = $this->dbLayer->querySelect('array', $tableName, $criteriaInstance); // Return the result return $result; @@ -137,7 +137,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re } /** - * "Inserts" a data set instance into a local file database folder + * 'Inserts' a data set instance into a local file database folder * * @param $dataSetInstance A storeable data set * @return void @@ -151,7 +151,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re } /** - * "Updates" a data set instance with a database layer + * 'Updates' a data set instance with a database layer * * @param $dataSetInstance A storeable data set * @return void diff --git a/inc/classes/middleware/debug/class_DebugMiddleware.php b/inc/classes/middleware/debug/class_DebugMiddleware.php index 8d25477e..743972c8 100644 --- a/inc/classes/middleware/debug/class_DebugMiddleware.php +++ b/inc/classes/middleware/debug/class_DebugMiddleware.php @@ -100,7 +100,7 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { * browser or debug lines for a log file, etc. to the registered debug * output instance. * - * @param $outStream Data we shall "stream" out to the world + * @param $outStream Data we shall 'stream' out to the world * @return void */ public final function output ($outStream) { diff --git a/inc/database.php b/inc/database.php index 544a2a55..b9f40fa6 100644 --- a/inc/database.php +++ b/inc/database.php @@ -29,15 +29,15 @@ $layerInstance = null; $cfg = FrameworkConfiguration::getInstance(); // Generate FQFN for the database layer -$INC = sprintf("%sinc/database/lib-%s.php", +$fqfn = sprintf("%sinc/database/lib-%s.php", $cfg->readConfig('base_path'), $cfg->readConfig('db_type') ); // Load the database layer include -if ((file_exists($INC)) && (is_file($INC)) && (is_readable($INC))) { +if ((file_exists($fqfn)) && (is_file($fqfn)) && (is_readable($fqfn))) { // Load the layer - require_once($INC); + require_once($fqfn); } else { // Layer is missing! ApplicationEntryPoint::app_die(sprintf("[Main:] Database layer is missing! (%s) -> R.I.P.", @@ -46,7 +46,7 @@ if ((file_exists($INC)) && (is_file($INC)) && (is_readable($INC))) { } // Clean it up -unset($INC); +unset($fqfn); // Prepare database instance $db = DatabaseConnection::createDatabaseConnection(DebugMiddleware::getInstance(), $layerInstance); diff --git a/inc/includes.php b/inc/includes.php index 61e8bb97..20128dbb 100644 --- a/inc/includes.php +++ b/inc/includes.php @@ -26,7 +26,7 @@ $cfg = FrameworkConfiguration::getInstance(); // Include the class loader function -require(sprintf("%sinc/loader/class_ClassLoader.php", $cfg->readConfig('base_path'))); +require($cfg->readConfig('base_path') . 'inc/loader/class_ClassLoader.php'); // Shall we include additional configs where you can configure some things? Then // Load matching config @@ -67,7 +67,7 @@ spl_autoload_register('ClassLoader::autoLoad'); /** * Is the devel package included? */ -if (is_dir(sprintf("%sdevel", $cfg->readConfig('base_path')))) { +if (is_dir($cfg->readConfig('base_path') . "devel")) { /** * Load all development includes */ diff --git a/inc/selector.php b/inc/selector.php index 96ed5505..33a4fa96 100644 --- a/inc/selector.php +++ b/inc/selector.php @@ -27,7 +27,7 @@ $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 + 'class_' . $cfg->readConfig('app_helper_class'), // The ApplicationHelper class 'config', // The application's own configuration 'data', // Application data 'init', // The application initializer