X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fclass_BaseFrameworkSystem.php;h=94c13b750e3af3ccf586a58f070cb36472aaaa4e;hb=8f7c53d0f83ff9e3c43761c669b2799bbe20f9f3;hp=e1f0d55fb45eef10e1124b9789d621785dbf9473;hpb=fbd656cb3ca44cd60893ad06983c43d908ad1e29;p=core.git diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index e1f0d55f..94c13b75 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -243,6 +243,16 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { */ private $genericArray = array(); + /** + * Command name + */ + private $commandName = ''; + + /** + * Controller name + */ + private $controllerName = ''; + /*********************** * Exception codes.... * ***********************/ @@ -1433,6 +1443,44 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { return $this->listenerInstance; } + /** + * Setter for command name + * + * @param $commandName Last validated command name + * @return void + */ + protected final function setCommandName ($commandName) { + $this->commandName = $commandName; + } + + /** + * Getter for command name + * + * @return $commandName Last validated command name + */ + protected final function getCommandName () { + return $this->commandName; + } + + /** + * Setter for controller name + * + * @param $controllerName Last validated controller name + * @return void + */ + protected final function setControllerName ($controllerName) { + $this->controllerName = $controllerName; + } + + /** + * Getter for controller name + * + * @return $controllerName Last validated controller name + */ + protected final function getControllerName () { + return $this->controllerName; + } + /** * Checks whether an object equals this object. You should overwrite this * method to implement own equality checks @@ -1670,7 +1718,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { // Try it try { // Get a debugger instance - $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getSelfInstance()->getConfigEntry('debug_' . $this->getResponseTypeFromSystem() . '_class')); + $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getSelfInstance()->getConfigEntry('debug_' . self::getResponseTypeFromSystem() . '_class')); } catch (NullPointerException $e) { // Didn't work, no instance there exit('Cannot create debugInstance! Exception=' . $e->__toString() . ', message=' . $e->getMessage()); @@ -1955,6 +2003,9 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { if (isset($fieldArray[$fieldName])) { // Get it $fieldValue = $fieldArray[$fieldName]; + } elseif (defined('DEVELOPER')) { + // Missing field entry, may require debugging + self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:fieldArray
=' . print_r($fieldArray, TRUE) . '
,fieldName=' . $fieldName . ' not found!'); } else { // Missing field entry, may require debugging self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']:fieldName=' . $fieldName . ' not found!'); @@ -2223,7 +2274,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { * * @return $responseType Analyzed response type */ - protected function getResponseTypeFromSystem () { + protected static function getResponseTypeFromSystem () { // Default is console $responseType = 'console';