Files merged from ship-simu project
[mailer.git] / inc / classes / main / database / class_BaseDatabaseFrontend.php
index b8f0d43541f808bbc6ef782d898b21552f7afc36..ac31d501f9205e7a03106db688815c21bd7fd42e 100644 (file)
@@ -4,10 +4,10 @@
  *
  * @see                        DatabaseFrontendInterface - An interface for database frontends (front-end to the application)
  * @author             Roland Haeder <webmaster@mxchange.org>
- * @version            0.3.0
+ * @version            0.0.0
  * @copyright  Copyright(c) 2007, 2008 Roland Haeder, this is free software
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.mxchange.org
+ * @link               http://www.ship-simu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements DatabaseFrontendInterface, LimitableObject {
        /**
@@ -29,43 +29,24 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab
        private $limitInstance = null;
 
        /**
-        * Private constructor
+        * Protected constructor
         *
         * @return      void
         */
-       private function __construct($class) {
+       protected function __construct($class) {
                // Call parent constructor
-               parent::constructor($class);
-
-               // Debug message
-               if (((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) $this->getDebugInstance()->output(sprintf("[%s:] Konstruktor erreicht.<br />\n",
-                       $this->__toString()
-               ));
+               parent::__construct($class);
 
                // Clean up a little
                $this->removeNumberFormaters();
        }
 
-       /**
-        * The public constructor
-        *
-        * @return      void
-        */
-       public function constructor ($class) {
-               // Calls just the private one
-               $this->__construct($class);
-       }
-
        /**
         * Getter for limitation instance
         *
         * @return      $limitInstance          The instance to the object ObjectLimits
         */
        public final function getLimitInstance () {
-               if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Limitierungsinstanz <strong>%s</strong> angefordert.<br />\n",
-                       $this->__toString(),
-                       $this->limitInstance->__toString()
-               ));
                return $this->limitInstance;
        }
 
@@ -78,12 +59,6 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab
         * @return      void
         */
        public final function limitObject (ObjectLimits $limitInstance) {
-               // Debug message
-               if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Limitierungsinstanz <strong>%s</strong> soll verwendet werden.<br />\n",
-                       $this->__toString(),
-                       $limitInstance->__toString()
-               ));
-
                // Get limitArray for validation
                $array = $limitInstance->getLimitArray();
 
@@ -91,13 +66,6 @@ abstract class BaseDatabaseFrontend extends BaseFrameworkSystem implements Datab
                if ($array->count() > 0) {
                        // Okay, there is enougth
                        $this->limitInstance = $limitInstance;
-
-                       // Debug message
-                       if ((defined('DEBUG_DATABASE')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:] Limitierungsinstanz <strong>%s</strong> wird verwendet und beinhaltet <strong>%s</strong> Eintr&auml;ge.<br />\n",
-                               $this->__toString(),
-                               $limitInstance->__toString(),
-                               $array->count()
-                       ));
                }
        }
 }