Source for file REDBObjects.class.php

Documentation is available at REDBObjects.class.php

  1. <?php
  2. /**
  3.  * R.E. DB Objects
  4.  *
  5.  * @author Takács Ákos (Rimelek), programmer [at] rimelek [dot] hu
  6.  * @copyright Copyright (C) 2010, Takács Ákos
  7.  * @version 2.1
  8.  * @license http://www.gnu.org/licenses/lgpl.html
  9.  * @package REDBObjects
  10.  */
  11.  
  12. /**
  13.  * Project kezelő osztály
  14.  *
  15.  * @author Takács Ákos (Rimelek), programmer [at] rimelek [dot] hu
  16.  * @copyright Copyright (C) 2010, Takács Ákos
  17.  * @license http://www.gnu.org/licenses/lgpl.html
  18.  * @package REDBObjects
  19.  */
  20. {
  21.     /**
  22.      * Adott adatbázis típushoz megfelelő osztályok importálása
  23.      *
  24.      * @param string $type Adatbázis típus
  25.      * @return bool True, ha sikerült az import. False, ha nem
  26.      */
  27.     public static function uses($type='mysql')
  28.     {
  29.         $dir dirname(__FILE__).'/'.$type;
  30.  
  31.         if (!is_dir($dir))
  32.         {
  33.             return false;
  34.         }
  35.  
  36.         $files scandir($dir);
  37.         foreach ($files as $file)
  38.         {
  39.             if ($file == '.' or $file == '..')
  40.             {
  41.                 continue;
  42.             }
  43.  
  44.             require_once $dir.'/'.$file;
  45.         }
  46.         return true;
  47.     }
  48. }
  49.  
  50. ?>

Documentation generated on Fri, 02 Apr 2010 17:34:19 +0200 by phpDocumentor 1.4.1