Source for file Database.abstract.php

Documentation is available at Database.abstract.php

  1. <?php
  2. /**
  3. * @since 9/5/07
  4. * @package harmoni.dbc
  5. *
  6. * @copyright Copyright &copy; 2007, Middlebury College
  7. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  8. *
  9. * @version $Id: Database.abstract.php,v 1.1 2007/09/05 21:38:59 adamfranco Exp $
  10. */
  11.  
  12. require_once(dirname(__FILE__)."/Database.interface.php");
  13.  
  14. /**
  15. * abstract definition of common database methods
  16. *
  17. * @since 9/5/07
  18. * @package harmoni.dbc
  19. *
  20. * @copyright Copyright &copy; 2007, Middlebury College
  21. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  22. *
  23. * @version $Id: Database.abstract.php,v 1.1 2007/09/05 21:38:59 adamfranco Exp $
  24. */
  25. abstract class DatabaseAbstract
  26. implements Database
  27. {
  28. /**
  29. * Answer the info to display to users on a connection error.
  30. *
  31. * @return string
  32. * @access public
  33. * @since 6/1/06
  34. */
  35. function getConnectionErrorInfo () {
  36. $dbManager = Services::getService("DatabaseManager");
  37. $configuration =$dbManager->_configuration;
  38. if ($configuration->getProperty('connectionInfo')) {
  39. return '<div style="border: 1px dotted; background-color: #FAA; margin: 10px; padding: 10px;">'.$configuration->getProperty('connectionInfo').'</div>';
  40. } else {
  41. return '';
  42. }
  43. }
  44. }
  45.  
  46. ?>

Documentation generated on Wed, 19 Sep 2007 10:22:28 -0400 by phpDocumentor 1.3.0RC3