Source for file class.BREVET.php

Documentation is available at class.BREVET.php

  1. <?php
  2.  
  3.  
  4. /**
  5.  * Stellt die Verbindung zur Tabelle 'brevet' her
  6.  *
  7.  * Verwaltet die Brevets
  8.  *
  9.  * @author Kay Koch, <kay.koch@gmx.de>
  10.  * @package src
  11.  * @subpackage foundation_tables
  12.  */
  13.  
  14. if (version_compare(PHP_VERSION'5')) {
  15.     die('This file was generated for PHP 5');
  16. }
  17.  
  18. /**
  19.  * Basisklasse aller Klassen mit Datenbankzugriff.
  20.  *
  21.  * stellt Methoden und Objekte zur Fehlermeldung und zum Datenbankzugriff zur
  22.  *
  23.  * @author Kay Koch
  24.  * @since 1.12.04
  25.  * @version 1.1
  26.  */
  27. require_once('src/foundation/tables/class.PARENTTABLES.php');
  28.  
  29. /* user defined includes */
  30. // section -64--88-122--2-1a4ded3:10259d7c267:-7ff1-includes begin
  31. // section -64--88-122--2-1a4ded3:10259d7c267:-7ff1-includes end
  32.  
  33. /* user defined constants */
  34. // section -64--88-122--2-1a4ded3:10259d7c267:-7ff1-constants begin
  35. // section -64--88-122--2-1a4ded3:10259d7c267:-7ff1-constants end
  36.  
  37.  
  38.  
  39. /**
  40.  * Stellt die Verbindung zur Tabelle 'brevet' her
  41.  *
  42.  * Verwaltet die Brevets
  43.  *
  44.  * @access public
  45.  * @author Kay Koch, <kay.koch@gmx.de>
  46.  * @package src
  47.  * @subpackage foundation_tables
  48.  */
  49. {
  50.     // --- ATTRIBUTES ---
  51.  
  52.     
  53.  
  54.     /**
  55.      * Beinhaltet den Datenbanknamen (brevet)
  56.      *
  57.      * @access protected
  58.      * @var string 
  59.      */
  60.     protected $dbTableName = 'brevet';
  61.  
  62.     /**
  63.      * array mit allen Brevets
  64.      *
  65.      * @access private
  66.      * @var array 
  67.      */
  68.     private static $data array();
  69.  
  70.     // --- OPERATIONS ---
  71.  
  72.     
  73.  
  74.     /**
  75.      * Short description of method getOptionList
  76.      *
  77.      * @access public
  78.      * @author Kay Koch, <kay.koch@gmx.de>
  79.      * @param int 
  80.      * @return string 
  81.      */
  82.     public function getOptionList($index 0)
  83.     {
  84.         $returnValue = (string) '';
  85.  
  86.         // section -64--88-122--2-1a4ded3:10259d7c267:-7fef begin
  87.         foreach (self::$data as $arrTmp){
  88.             $selected ($arrTmp['brevet_id'== $index"SELECTED" "";
  89.             $returnValue .= "<option $selected value='$arrTmp['brevet_id'"'>" $arrTmp['name'"</option>\n";
  90.         
  91.         // section -64--88-122--2-1a4ded3:10259d7c267:-7fef end
  92.  
  93.         return (string) $returnValue;
  94.     }
  95.  
  96.     /**
  97.      * Short description of method getData
  98.      *
  99.      * @access public
  100.      * @author Kay Koch, <kay.koch@gmx.de>
  101.      * @param int 
  102.      * @return string 
  103.      */
  104.     public function getData($index)
  105.     {
  106.         $returnValue = (string) '';
  107.  
  108.         // section -64--88-122--2-1328c7a:1027db0d532:-7fe8 begin
  109.         $returnValue self::$data[$index]['name']
  110.         // section -64--88-122--2-1328c7a:1027db0d532:-7fe8 end
  111.  
  112.         return (string) $returnValue;
  113.     }
  114.  
  115.     /**
  116.      * Short description of method __construct
  117.      *
  118.      * @access public
  119.      * @author Kay Koch, <kay.koch@gmx.de>
  120.      * @return void 
  121.      */
  122.     public function __construct()
  123.     {
  124.         // section -64--88-122--2-1328c7a:102a6f94cac:-7feb begin
  125.         parent::__construct();
  126.         $sql "SELECT  * FROM " $this->dbTableName;
  127.         $arrTmp $this->select($sql);
  128.         foreach($arrTmp as $brevetself::$data[$brevet['brevet_id']] $brevet
  129.         // section -64--88-122--2-1328c7a:102a6f94cac:-7feb end
  130.     }
  131.  
  132. /* end of class src_foundation_tables_BREVET */
  133.  
  134. ?>

Documentation generated on Sat, 24 Mar 2007 09:58:56 +0100 by phpDocumentor 1.3.1