Source for file DbConectionMaker.class.php

Documentation is available at DbConectionMaker.class.php

  1. <?php
  2. /**
  3.  * Abstract Class DbConectionMaker, inherite a db-Object
  4.  *
  5.  * LICENSE: CREATIVE COMMONS PUBLIC LICENSE  "Namensnennung — Nicht-kommerziell 2.0"
  6.  *
  7.  * @copyright  2009 <SEDesign />
  8.  * @license    http://creativecommons.org/licenses/by-nc/2.0/de/
  9.  * @version    $3.0.6$
  10.  * @link       http://www.sedesign.de/de_produkte_chat-v3.html
  11.  * @since      File available since Alpha 1.0
  12.  */
  13.  
  14. abstract class DbConectionMaker extends EtChatConfig
  15. {
  16.     /**
  17.     * Database connection obj for all inherited classes
  18.     * @var ConnectDB 
  19.     */
  20.     protected $dbObj;
  21.     
  22.     /**
  23.     * Constructor
  24.     *
  25.     * @uses ConnectDB object creation
  26.     * @return void 
  27.     */
  28.     protected function __construct (){
  29.     
  30.         // call parent Constructor from class EtChatConfig
  31.         parent::__construct();
  32.                 
  33.         if ($this->_usedDatabaseExtension=="pdo"$this->dbObj = new ConnectDB;
  34.         if ($this->_usedDatabaseExtension=="mysqli"$this->dbObj = new ConnectDBMysqli;
  35.         
  36.     }
  37.     
  38.     /**
  39.     * Sets the session vars in the chatsession from the etchat_config table
  40.     * this function has only be run once at the beginning to get all needed params to the user session.
  41.     *
  42.     * @uses ConnectDB::sqlGet()
  43.     * @return void 
  44.     */
  45.     protected function configTabData2Session (){    
  46.         // gets a array with the params from the etchat_config table
  47.         $feld $this->dbObj->sqlGet("select etchat_config_reloadsequenz, etchat_config_messages_im_chat, etchat_config_style, etchat_config_loeschen_nach, etchat_config_lang FROM {$this->_prefix}etchat_config where etchat_config_id=1");
  48.         
  49.         // setting all the session vars
  50.         $_SESSION['etchat_'.$this->_prefix.'config_reloadsequenz'$feld[0][0];
  51.         $_SESSION['etchat_'.$this->_prefix.'anz_messages_im_chat'$feld[0][1];
  52.         $_SESSION['etchat_'.$this->_prefix.'style'$feld[0][2];
  53.         $_SESSION['etchat_'.$this->_prefix.'loeschen_nach'$feld[0][3];
  54.         $_SESSION['etchat_'.$this->_prefix.'lang_xml_file'$feld[0][4];
  55.     }

Documentation generated on Tue, 22 Dec 2009 09:42:47 +0100 by phpDocumentor 1.4.1