root/plugins/sfAmfphpPlugin/trunk/lib/amfphp/core/shared/adapters/doctrineAdapter.php
| Revision 18367, 1.0 kB (checked in by gmork123, 4 years ago) |
|---|
| Line | |
|---|---|
| 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 | |
| 17 | require_once(AMFPHP_BASE . "shared/adapters/RecordSetAdapter.php"); |
| 18 | |
| 19 | class doctrineAdapter extends RecordSetAdapter |
| 20 | { |
| 21 | function doctrineAdapter($d) { |
| 22 | parent::RecordSetAdapter($d); |
| 23 | |
| 24 | if(count($d) > 0) |
| 25 | { |
| 26 | $firstRow = true; |
| 27 | foreach($d as $row) |
| 28 | { |
| 29 | $this->rows[] = array_values($row->toArray()); |
| 30 | if($firstRow) |
| 31 | { |
| 32 | $this->columns = array_keys($row->toArray()); |
| 33 | $firstRow = false; |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | ?> |
Note: See TracBrowser for help on using the browser.