From bab35adfd7283f2e0613f8198a5451627d8e3b72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 11 Nov 2010 18:31:46 +0000 Subject: [PATCH] Some methods moved, speed improved --- .../exceptions/class_FrameworkException.php | 10 +++---- .../main/class_BaseFrameworkSystem.php | 26 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/inc/classes/exceptions/class_FrameworkException.php b/inc/classes/exceptions/class_FrameworkException.php index 3b7a3c9f..4f79738b 100644 --- a/inc/classes/exceptions/class_FrameworkException.php +++ b/inc/classes/exceptions/class_FrameworkException.php @@ -114,7 +114,7 @@ abstract class FrameworkException extends ReflectionException { $dbgMsg = "
\nDebug backtrace begin:
\n"; foreach ($dbgTrace as $dbgIndex => $dbgInfo) { // No info by default - $info = "NULL"; + $info = 'NULL'; // Are there arguments? if ((isset($dbgInfo['args'])) && (is_array($dbgInfo['args'])) && (isset($dbgInfo['args'][0]))) { @@ -132,18 +132,18 @@ abstract class FrameworkException extends ReflectionException { } // END - if // Prepare argument infos - $info = "{$info}"; + $info = '' . $info . ''; // File detection - $file = "Unknown file"; + $file = 'Unknown file'; if (isset($dbgInfo['file'])) { $file = basename($dbgInfo['file']); } // END - if // Line detection - $line = "Unknown line"; + $line = 'Unknown line'; if (isset($dbgInfo['line'])) { - $line = "line {$dbgInfo['line']}"; + $line = 'line ' . $dbgInfo['line']; } // END - if // The message diff --git a/inc/classes/main/class_BaseFrameworkSystem.php b/inc/classes/main/class_BaseFrameworkSystem.php index 15acea16..7fa4374d 100644 --- a/inc/classes/main/class_BaseFrameworkSystem.php +++ b/inc/classes/main/class_BaseFrameworkSystem.php @@ -375,7 +375,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Setter for resolver instance * - * @param $resolverInstance Instance of a command resolver class + * @param $resolverInstance Instance of a command resolver class * @return void */ public final function setResolverInstance (Resolver $resolverInstance) { @@ -385,7 +385,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { /** * Getter for resolver instance * - * @return $resolverInstance Instance of a command resolver class + * @return $resolverInstance Instance of a command resolver class */ public final function getResolverInstance () { return $this->resolverInstance; @@ -598,6 +598,17 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { return $result; } + /** + * Generates a generic hash code of this class. You should really overwrite + * this method with your own hash code generator code. But keep KISS in mind. + * + * @return $hashCode A generic hash code respresenting this whole class + */ + public function hashCode () { + // Simple hash code + return crc32($this->__toString()); + } + /** * Formats computer generated price values into human-understandable formats * with thousand and decimal seperators. @@ -1147,17 +1158,6 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface { } } - /** - * Generates a generic hash code of this class. You should really overwrite - * this method with your own hash code generator code. But keep KISS in mind. - * - * @return $hashCode A generic hash code respresenting this whole class - */ - public function hashCode () { - // Simple hash code - return crc32($this->__toString()); - } - /** * Checks wether the given PHP extension is loaded * -- 2.39.5