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>",
- $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>",
- $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>",
- $className
+ $className,
+ $e->getMessage()
));
}
}
if (!is_array($debug)) {
$info .= $debug.", ";
} // END - if
- } // END - if
+ } // END - foreach
+ // Remove last chars (commata, space)
$info = substr($info, 0, -2);
} // 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>) -> ".$dbgInfo['function']."(".$info.")<br />\n";
} // END - if
+
+ // Add end-message
$dbgMsg .= "Debug backtrace end<br />\n";
+ // Return full debug message
return $dbgMsg;
}
/**
* The real class name
*/
- private $realClass = "FrameworkSystem";
+ private $realClass = 'FrameworkSystem';
/**
* Thousands seperator
*/
- private $thousands = "."; // German
+ private $thousands = '.'; // German
/**
* Decimal seperator
*/
- private $decimals = ","; // German
+ private $decimals = ','; // German
/***********************
* Exception codes.... *
*---------------------------------------------------------------------*
*/
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
*
$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')
- )));
+ ));
// Initialization done! :D
Registry::isInitialized('OK');
$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?
- 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.
}
// 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;
// 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]
?>
$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?
* 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')
- ));
+ );
} 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()
// 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
- if (($inc == "starter") && (defined('TEST'))) {
+ if (($inc == 'starter') && (defined('TEST'))) {
// Skip it here
continue;
}