Phundament-Packages
[ class tree: Phundament-Packages ] [ index: Phundament-Packages ] [ all elements ]

Source for file LPropel.php

Documentation is available at LPropel.php

  1. <?php
  2. /**
  3.  * LPropel class file.
  4.  *
  5.  * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
  6.  * @copyright 2005, diemeisterei GmbH. All rights reserved.
  7.  * @author $Author: schmunk $
  8.  * @version $Revision: 601 $  $Date: 2007-02-24 23:49:30 +0100 (Sa, 24 Feb 2007) $
  9.  * @package Phundament.Packages
  10.  * @subpackage LDatabase
  11.  */
  12.  
  13. /**
  14.  * Connection wrapper
  15.  *
  16.  * @package System.Data
  17.  */
  18. class LPropel
  19. {
  20.     /**
  21.      * Returns a 'Propel' connection for the sub configuration from the package
  22.      */
  23.     public function getConnection($name)
  24.     {
  25.         static $propel;
  26.         if (!is_object($propel))
  27.         {
  28.             $config $this->Application->getModule("database")->DatabaseConfig->getConfig();
  29.             $propel new Propel;
  30.             $propel->setConfiguration($config);
  31.             $propel->initialize();
  32.             Prado :: trace("New propel class initalized"'Lithron.LPropel');
  33.         }
  34.         $con $propel->getConnection($name);
  35.         return $con;
  36.     }
  37.  
  38. }
  39. ?>

Documentation generated on Sun, 25 Feb 2007 16:11:34 +0100 by phpDocumentor 1.3.1