- <?php
- /**
- * LPropel class file.
- *
- * @license http://opensource.org/licenses/mozilla1.1.php Mozilla Public License
- * @copyright 2005, diemeisterei GmbH. All rights reserved.
- * @author $Author: schmunk $
- * @version $Revision: 188 $ $Date: 2006-05-11 10:50:16 +0200 (Do, 11 Mai 2006) $
- * @package Lithron.LDatabase
- * @subpackage Support
- */
-
- /**
- * Connection wrapper
- *
- * @package Lithron.LDatabase
- * @subpackage Support
- */
- class LPropel
- {
- /**
- * Returns a 'Propel' connection for the sub configuration from the package
- */
- public function getConnection($name)
- {
- static $propel;
- if (!is_object($propel))
- {
- $config = $this->Application->getModule("database")->DatabaseConfig->getConfig();
- $propel = new Propel;
- $propel->setConfiguration($config);
- $propel->initialize();
- Prado :: trace("New propel class initalized", 'Lithron.LPropel');
- }
- $con = $propel->getConnection($name);
- return $con;
- }
-
- }
- ?>