Lithron.LDatabase
[ class tree: Lithron.LDatabase ] [ index: Lithron.LDatabase ] [ 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: 188 $ $Date: 2006-05-11 10:50:16 +0200 (Do, 11 Mai 2006) $
  9. * @package Lithron.LDatabase
  10. * @subpackage Support
  11. */
  12.  
  13. /**
  14. * Connection wrapper
  15. *
  16. * @package Lithron.LDatabase
  17. * @subpackage Support
  18. */
  19. class LPropel
  20. {
  21. /**
  22. * Returns a 'Propel' connection for the sub configuration from the package
  23. */
  24. public function getConnection($name)
  25. {
  26. static $propel;
  27. if (!is_object($propel))
  28. {
  29. $config = $this->Application->getModule("database")->DatabaseConfig->getConfig();
  30. $propel = new Propel;
  31. $propel->setConfiguration($config);
  32. $propel->initialize();
  33. Prado :: trace("New propel class initalized", 'Lithron.LPropel');
  34. }
  35. $con = $propel->getConnection($name);
  36. return $con;
  37. }
  38.  
  39. }
  40. ?>

Documentation generated on Tue, 20 Jun 2006 05:15:23 +0200 by phpDocumentor 1.3.0RC4