]> git.mxchange.org Git - core.git/commitdiff
Continued:
authorRoland Haeder <roland@mxchange.org>
Thu, 23 Feb 2017 19:52:00 +0000 (20:52 +0100)
committerRoland Haeder <roland@mxchange.org>
Tue, 28 Feb 2017 21:10:04 +0000 (22:10 +0100)
- added "import" for BaseMiddleware class
- changed one-line comment to doc-tag as this is propper here

Signed-off-by: Roland Häder <roland@mxchange.org>
inc/main/middleware/compressor/class_CompressorChannel.php
inc/main/middleware/database/class_DatabaseConnection.php
inc/main/middleware/debug/class_DebugMiddleware.php
inc/main/middleware/io/class_FileIoHandler.php

index 4adb945ad1ee196dbe26db46fdd0cc3fe9a62a6f..1e5cdbc9ed3bb0cabc2768d9bb19a0394b081502 100644 (file)
@@ -4,6 +4,7 @@ namespace CoreFramework\Channel\Compressor;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Middleware\BaseMiddleware;
 
 /**
  * Middleware class for selecting the right compressor channel
index b695c867eb12d7060eca3dfe184276d5d0e8ac4e..d6e847cc2f80efb0021613bab8882ce8dbcf86ef 100644 (file)
@@ -4,6 +4,7 @@ namespace CoreFramework\Connection\Database;
 
 // Import framework stuff
 use CoreFramework\Registry\Registerable;
+use CoreFramework\Middleware\BaseMiddleware;
 
 /**
  * Database selector class
@@ -32,29 +33,36 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
         * Array for connection data
         */
        private $connectData = array(
-               'login' => '',
-               'pass'  => '',
-               'dbase' => '',
-               'host'  => ''
+               'login' => '',
+               'pass'  => '',
+               'dbase' => '',
+               'host'  => ''
        );
 
-       // The real database layer
+       /**
+        * The real database layer
+        */
        private $dbLayer = NULL;
 
-       // An instance of this class
+       /**
+        * An instance of this class
+        */
        private static $selfInstance = NULL;
 
        /**
         * Protected constructor
-        *
-        * @return      void
         */
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
        }
 
-       // Create new database connection layer
+       /**
+        * Creates a new database connection layer
+        *
+        * @param       $debugInstance  An instance of a DebugMiddleware class
+        * @param       $dbLayer                An instance of a DatabaseBackend class
+        */
        public static final function createDatabaseConnection (DebugMiddleware $debugInstance, DatabaseBackend $dbLayer) {
                // Get instance
                $databaseInstance = new DatabaseConnection();
@@ -69,13 +77,26 @@ class DatabaseConnection extends BaseMiddleware implements DatabaseConnector, Re
                return $databaseInstance;
        }
 
-       // Get an instance of this class
+       /**
+        * Getter for this class
+        *
+        * @return      $selfInstance   An instance of this class
+        */
        public static final function getSelfInstance () {
                return self::$selfInstance;
        }
 
-       // Public setter for database connection
-       public final function setConnectionData ($login, $pass, $dbase, $host='localhost') {
+       /**
+        * Setter for all database connection data. All these parameters may be
+        * supported by the underlaying backend.
+        *
+        * @param       $login  Login name to database
+        * @param       $pass   Passwort for above login
+        * @param       $dbase  Name of used database
+        * @param       $host   Host to connect to (default: 127.0.0.1)
+        * @return      void
+        */
+       public final function setConnectionData ($login, $pass, $dbase, $host = '127.0.0.1') {
                // Transfer connection data
                $this->connectData['login'] = (string) $login;
                $this->connectData['pass']  = (string) $pass;
index 19ebd395976c51856753e09208b5893f4aa959e7..81948737bf6f04cb2201210098a03c34be7db1f0 100644 (file)
@@ -4,6 +4,7 @@ namespace CoreFramework\Middleware\Debug;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Middleware\BaseMiddleware;
 
 /**
  * The middlware debug output system. A *real* or concrete output class shall
index 26e19f6ccec9b13ff2122529f0afbdd13ffcf2ea..75d0af5e3b74f8b1e0bdf86f412d1679c10a865f 100644 (file)
@@ -5,6 +5,7 @@ namespace CoreFramework\Handler\Filesystem;
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Generic\FrameworkInterface;
+use CoreFramework\Middleware\BaseMiddleware;
 
 /**
  * This is a file IO handler. It handles reading from and writing to files.