1
0
mirror of synced 2025-01-18 14:31:40 +03:00
doctrine2/playground/index.php
2007-09-27 22:02:13 +00:00

27 lines
811 B
PHP

<?php
require_once('playground.php');
if (isset($_REQUEST['server'])) {
require_once('connection.php');
require_once('models.php');
require_once('data.php');
$name = 'Doctrine_Resource_Playground';
$config = array('models' => $tables);
$server = Doctrine_Resource_Server::getInstance($name, $config);
$server->run($_REQUEST);
} else {
$url = 'http://localhost/~jwage/doctrine_trunk/playground/index.php?server';
$config = array('format' => 'json');
// Instantiate a new client
$client = Doctrine_Resource_Client::getInstance($url, $config);
$query = new Doctrine_Resource_Query();
$users = $query->from('User u, u.Phonenumber p, u.Email e, u.Address a')->execute();
print_r($users->toArray(true));
}