X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fclass_BaseFrameworkSystem.php;h=9f5ede14c4ff00a36c0aeffe0044b249a3f38345;hp=46280f890d3063a02b741b52fb6eac6e6b419dc9;hb=e34616029809186df4dfe08b1fb98760f8102e97;hpb=49f84a522f0ccac3b70728cd41011a0be0eed8cf diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 46280f89..9f5ede14 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -5,7 +5,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007 - 2009 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -276,7 +276,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $this->setDebugInstance(DebugMiddleware::createDebugMiddleware($this->getConfigInstance()->readConfig('debug_class'))); // Get output instance and set it - $outputInstance = ObjectFactory::createObjectByConfiguredName('web_engine', array($this->getConfigInstance()->readConfig('web_content_type'))); + $outputInstance = ObjectFactory::createObjectByConfiguredName('output_class', array($this->getConfigInstance()->readConfig('web_content_type'))); $this->setWebOutputInstance($outputInstance); // Set the compressor channel @@ -740,13 +740,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } // END - if } // END - if - // Generate FQFN for all application templates - $fqfn = sprintf("%s%s/%s", - $this->getConfigInstance()->readConfig('application_path'), - strtolower($appInstance->getAppShortName()), - $this->getConfigInstance()->readConfig('tpl_base_path') - ); - // Are both instances set? if ($appInstance->getLanguageInstance() === null) { // Invalid language instance @@ -757,7 +750,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } // Initialize the template engine - $templateInstance = ObjectFactory::createObjectByConfiguredName('template_class', array($fqfn, $appInstance->getLanguageInstance(), $appInstance->getFileIoInstance())); + $templateInstance = ObjectFactory::createObjectByConfiguredName('template_class', array($appInstance)); // Return the prepared instance return $templateInstance; @@ -867,7 +860,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if ($doPrint === false) die(); // Die here if not printed } else { // Put directly out - if ($doPrint) { + if ($doPrint === true) { print($message); } else { // DO NOT REWRITE THIS TO app_die() !!! @@ -887,7 +880,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $className = ''; // Convert all dashes in underscores - $str = $this->convertDashesToUnderscore($str); + $str = $this->convertDashesToUnderscores($str); // Now use that underscores to get classname parts for hungarian style foreach (explode('_', $str) as $strPart) { @@ -1119,6 +1112,30 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { $wrapperInstance->doUpdateByResult($this->getResultInstance()); } // END - if } + + /** + * Outputs a deprecation warning to the developer. + * + * @param $message The message we shall output to the developer + * @return void + * @todo Write a logging mechanism for productive mode + */ + public function deprecationWarning ($message) { + // Is developer mode active? + if (defined('DEVELOPER')) { + // Debug instance is there? + if (!is_null($this->getDebugInstance())) { + // Output stub message + $this->debugOutput($message); + } else { + // Trigger an error + trigger_error($message."
\n"); + } + } else { + // @TODO Finish this part! + $this->partialStub('Developer mode inactive. Message:' . $message); + } + } } // [EOF]