1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/playground/index.php

24 lines
673 B
PHP
Raw Normal View History

2007-09-13 20:55:32 +04:00
<?php
2007-09-19 20:26:28 +04:00
require_once('playground.php');
require_once('connection.php');
require_once('models.php');
2007-09-22 05:32:48 +04:00
require_once('data.php');
$action = isset($_REQUEST['action']) ? $_REQUEST['action']:'client';
if ($action == 'server') {
$config = array();
$server = new Doctrine_Resource_Server($config);
$server->run($_REQUEST);
} else {
$config = array('url' => 'http://localhost/~jwage/doctrine_trunk/playground/index.php?action=server');
$client = new Doctrine_Resource_Client($config);
$record = $client->newRecord('User');
$record->name = 'jon wage';
$record->loginname = 'test';
$record->save();
print_r($record->toArray());
}