From 9114236c06107fd4d9c20f7e8ebabf16e7383d45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 8 Nov 2011 07:46:19 +0000 Subject: [PATCH] $selfInstance is better --- inc/classes/main/language/class_LanguageSystem.php | 8 ++++---- .../middleware/database/class_DatabaseConnection.php | 6 +++--- inc/classes/middleware/debug/class_DebugMiddleware.php | 8 ++++---- inc/classes/middleware/io/class_FileIoHandler.php | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inc/classes/main/language/class_LanguageSystem.php b/inc/classes/main/language/class_LanguageSystem.php index 3cde5308..4a6b7205 100644 --- a/inc/classes/main/language/class_LanguageSystem.php +++ b/inc/classes/main/language/class_LanguageSystem.php @@ -41,7 +41,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, /** * An instance of this class */ - private static $thisInstance = NULL; + private static $selfInstance = NULL; /** * Protected constructor @@ -94,7 +94,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, $langInstance->setLanguageCode(FrameworkConfiguration::getSelfInstance()->getConfigEntry('default_lang')); // Remember this instance - self::$thisInstance = $langInstance; + self::$selfInstance = $langInstance; // Return the prepared instance return $langInstance; @@ -103,10 +103,10 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage, /** * Singleton getter for this instance * - * @return $thisInstance An instance of this class + * @return $selfInstance An instance of this class */ public static final function getSelfInstance () { - return self::$thisInstance; + return self::$selfInstance; } /** diff --git a/inc/classes/middleware/database/class_DatabaseConnection.php b/inc/classes/middleware/database/class_DatabaseConnection.php index 0a688c39..853cb951 100644 --- a/inc/classes/middleware/database/class_DatabaseConnection.php +++ b/inc/classes/middleware/database/class_DatabaseConnection.php @@ -36,7 +36,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re private $dbLayer = NULL; // An instance of this class - private static $thisInstance = NULL; + private static $selfInstance = NULL; /** * Protected constructor @@ -60,7 +60,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re $databaseInstance->setDatabaseLayer($dbLayer); // Set db instance - self::$thisInstance = $databaseInstance; + self::$selfInstance = $databaseInstance; // Return instance return $databaseInstance; @@ -68,7 +68,7 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re // Get an instance of this class public static final function getSelfInstance () { - return self::$thisInstance; + return self::$selfInstance; } // Public setter for database connection diff --git a/inc/classes/middleware/debug/class_DebugMiddleware.php b/inc/classes/middleware/debug/class_DebugMiddleware.php index 14901161..51e17257 100644 --- a/inc/classes/middleware/debug/class_DebugMiddleware.php +++ b/inc/classes/middleware/debug/class_DebugMiddleware.php @@ -32,7 +32,7 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { /** * An instance of this class */ - private static $thisInstance = NULL; + private static $selfInstance = NULL; /** * Protected constructor @@ -44,7 +44,7 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { parent::__construct(__CLASS__); // Set own instance - self::$thisInstance = $this; + self::$selfInstance = $this; // Set it so all can use it $this->setDebugInstance($this); @@ -82,10 +82,10 @@ class DebugMiddleware extends BaseMiddleware implements Registerable { /** * Getter for an instance of this class * - * @return $thisInstance An instance of this class + * @return $selfInstance An instance of this class */ public static final function getSelfInstance() { - return self::$thisInstance; + return self::$selfInstance; } /** diff --git a/inc/classes/middleware/io/class_FileIoHandler.php b/inc/classes/middleware/io/class_FileIoHandler.php index 70afeefe..93c40c93 100644 --- a/inc/classes/middleware/io/class_FileIoHandler.php +++ b/inc/classes/middleware/io/class_FileIoHandler.php @@ -36,7 +36,7 @@ class FileIoHandler extends BaseMiddleware { /** * An instance of this class */ - private static $thisInstance = NULL; + private static $selfInstance = NULL; /** * Protected constructor @@ -48,7 +48,7 @@ class FileIoHandler extends BaseMiddleware { parent::__construct(__CLASS__); // Set own instance - self::$thisInstance = $this; + self::$selfInstance = $this; } /** @@ -72,10 +72,10 @@ class FileIoHandler extends BaseMiddleware { /** * Getter for an instance of this class * - * @return $thisInstance An instance of this class + * @return $selfInstance An instance of this class */ public static final function getSelfInstance () { - return self::$thisInstance; + return self::$selfInstance; } /** -- 2.39.5