DBServer.php 998 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /** @package verysimple::DB::Reflection */
  3. /** import supporting libraries */
  4. require_once("DBConnection.php");
  5. require_once("DBSchema.php");
  6. /**
  7. * DBServer is an object representation of a MySQL Server
  8. *
  9. * @package verysimple::DB::Reflection
  10. * @author Jason Hinkle
  11. * @copyright 1997-2007 VerySimple, Inc.
  12. * @license http://www.gnu.org/licenses/lgpl.html LGPL
  13. * @version 1.0
  14. */
  15. class DBServer
  16. {
  17. public $Connection;
  18. public $SchemaName;
  19. /**
  20. * Instantiate new DBServer
  21. *
  22. * @access public
  23. * @param DBConnection $connection
  24. */
  25. function __construct($connection)
  26. {
  27. $this->Connection =& $connection;
  28. }
  29. /**
  30. * Return the schema with the given name from this server
  31. *
  32. * @access public
  33. * @param string $name
  34. * @return DBSchema
  35. */
  36. function GetSchema()
  37. {
  38. $this->Connection->Connect();
  39. $schema = new DBSchema($this);
  40. $this->Connection->Disconnect();
  41. return $schema;
  42. }
  43. }
  44. ?>