Source for file class.MULTI.php

Documentation is available at class.MULTI.php

  1. <?php
  2.  
  3. /**
  4.  * Verwaltet Sessions
  5.  *
  6.  * @author Kay Koch, <kay.koch@gmx.de>
  7.  * @package src
  8.  * @subpackage tools
  9.  */
  10.  
  11. if (version_compare(PHP_VERSION'5')) {
  12.    die('This file was generated for PHP 5');
  13. }
  14.  
  15. /* user defined includes */
  16. // section -64--88-122--2--52a182bd:1038e11d8ad:-7fe4-includes begin
  17. // section -64--88-122--2--52a182bd:1038e11d8ad:-7fe4-includes end
  18.  
  19. /* user defined constants */
  20. // section -64--88-122--2--52a182bd:1038e11d8ad:-7fe4-constants begin
  21. // section -64--88-122--2--52a182bd:1038e11d8ad:-7fe4-constants end
  22.  
  23. /**
  24.  * Verwaltet Sessions
  25.  *
  26.  * @access public
  27.  * @author Kay Koch, <kay.koch@gmx.de>
  28.  * @package src
  29.  * @subpackage tools
  30.  */
  31. class src_tools_MULTI {
  32.    // --- ATTRIBUTES ---
  33.  
  34.    
  35.    /**
  36.     * Feld mit Umlauten, die geändert werden sollen
  37.     *
  38.     * @access private
  39.     * @var array $umlaute 
  40.     */
  41.    private static $umlaute Array (
  42.       "/ä/",
  43.       "/ö/",
  44.       "/ü/",
  45.       "/Ä/",
  46.       "/Ö/",
  47.       "/Ü/",
  48.       "/ß/"
  49.    );
  50.  
  51.    /**
  52.     * Feld mit Ersatzwerten, die geändert werden sollen
  53.     *
  54.     * @access private
  55.     * @var array $replace 
  56.     */
  57.    private static $replace Array (
  58.       "ae",
  59.       "oe",
  60.       "ue",
  61.       "Ae",
  62.       "Oe",
  63.       "Ue",
  64.       "ss"
  65.    );
  66.  
  67.    // --- OPERATIONS ---
  68.  
  69.    
  70.    /**
  71.     * tauscht umlaute und schreibt klein
  72.     *
  73.     * @access public
  74.     * @author Kay Koch, <kay.koch@gmx.de>
  75.     * @return string 
  76.     */
  77.    public static function cleanUmlaute($name{
  78.       return (string) preg_replace(self :: $umlauteself :: $replacestrtolower($name));
  79.    }
  80.  
  81.    /**
  82.     * liefert ein OptionList mit den Tagen eines Monats aus
  83.     *
  84.     * @access public
  85.     * @author Kay Koch, <kay.koch@gmx.de>
  86.     * @param int $vNr Wert der bei übereinstimmung SELECTED wird
  87.     * @param int $maxNr max. Wert bis zu dem das Menü erstellt wird
  88.     * @return string 
  89.     */
  90.    public static function getNrOL($vNr$maxNr{
  91.       $returnValue = (string) '';
  92.       for ($nr 0$nr <= $maxNr$nr++{
  93.          $selected ($nr == $vNr"SELECTED" "";
  94.          $returnValue .= "<option $selected value='$nr'>$nr</option>\n";
  95.       }
  96.       return (string) $returnValue;
  97.    }
  98.  
  99.    /**
  100.     *
  101.     * speichert Inhalt unter Dateinamen ab
  102.     *
  103.     * @author kaykoch
  104.     * @access private
  105.     * @since 1 - 01.03.2007
  106.     * @param string $content Inhalt
  107.     * @param string $filename Dateiname
  108.     * @return boolean 
  109.     *
  110.     */
  111.    public static function saveFile($content$filename{
  112.       $returnValue "";
  113.       try {
  114.          if (!($fp fopen($filename"w")))
  115.             throw new Exception("Fehler beim Dateianlegen (" $filename ")");
  116.          fwrite($fp$content);
  117.          fclose($fp);
  118.          $returnValue true;
  119.       catch (Exception $e{
  120.          src_tools_ERROR :: setError($e__METHOD__);
  121.       }
  122.       return $returnValue;
  123.    }
  124.  
  125. /* end of class src_tools_MULTI */
  126. ?>

Documentation generated on Sat, 24 Mar 2007 09:59:39 +0100 by phpDocumentor 1.3.1