doctrineAdapter.php 1012 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * This Adapter translates the specific Database type links to the data and pulls the data into very
  4. * specific local variables to later be retrieved by the gateway and returned to the client.
  5. *
  6. * pdoAdapter is a contribution of Andrea Giammarchi
  7. *
  8. * Now using fast serialization
  9. *
  10. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  11. * @copyright (c) 2003 amfphp.org
  12. * @package flashservices
  13. * @subpackage adapters
  14. * @version $Id: sqliteAdapter.php,v 1.1 2005/07/05 07:56:29 pmineault Exp $
  15. */
  16. require_once(AMFPHP_BASE . "shared/adapters/RecordSetAdapter.php");
  17. class doctrineAdapter extends RecordSetAdapter
  18. {
  19. function doctrineAdapter($d) {
  20. parent::RecordSetAdapter($d);
  21. if(count($d) > 0)
  22. {
  23. $firstRow = true;
  24. foreach($d as $row)
  25. {
  26. $this->rows[] = array_values($row->toArray());
  27. if($firstRow)
  28. {
  29. $this->columns = array_keys($row->toArray());
  30. $firstRow = false;
  31. }
  32. }
  33. }
  34. }
  35. }
  36. ?>