Commit 26945749 authored by Jonathan.Wage's avatar Jonathan.Wage

Removed.

parent 81324ec8
<?php
$dbh = new PDO('sqlite::memory:');
$conn = Doctrine_Manager::connection($dbh);
$manager = Doctrine_Manager::getInstance();
\ No newline at end of file
<?php
$groups = new Doctrine_Collection($conn->getTable('Group'));
$groups[0]->name = 'Drama Actors';
$groups[1]->name = 'Quality Actors';
$groups[2]->name = 'Action Actors';
$groups[2]['Phonenumber'][0]->phonenumber = '123 123';
$groups->save();
$users = new Doctrine_Collection('User');
$users[0]->name = 'zYne';
$users[0]['Email']->address = 'zYne@example.com';
$users[0]['Phonenumber'][0]->phonenumber = '123 123';
$users[0]['Address'][0]->address = '112 2nd ave';
$users[1]->name = 'Arnold Schwarzenegger';
$users[1]->Email->address = 'arnold@example.com';
$users[1]['Phonenumber'][0]->phonenumber = '123 123';
$users[1]['Phonenumber'][1]->phonenumber = '456 456';
$users[1]->Phonenumber[2]->phonenumber = '789 789';
$users[1]->Group[0] = $groups[2];
$users[2]->name = 'Michael Caine';
$users[2]->Email->address = 'caine@example.com';
$users[2]->Phonenumber[0]->phonenumber = '123 123';
$users[3]->name = 'Takeshi Kitano';
$users[3]->Email->address = 'kitano@example.com';
$users[3]->Phonenumber[0]->phonenumber = '111 222 333';
$users[4]->name = 'Sylvester Stallone';
$users[4]->Email->address = 'stallone@example.com';
$users[4]->Phonenumber[0]->phonenumber = '111 555 333';
$users[4]['Phonenumber'][1]->phonenumber = '123 213';
$users[4]['Phonenumber'][2]->phonenumber = '444 555';
$users[5]->name = 'Kurt Russell';
$users[5]->Email->address = 'russell@example.com';
$users[5]->Phonenumber[0]->phonenumber = '111 222 333';
$users[6]->name = 'Jean Reno';
$users[6]->Email->address = 'reno@example.com';
$users[6]->Phonenumber[0]->phonenumber = '111 222 333';
$users[6]['Phonenumber'][1]->phonenumber = '222 123';
$users[6]['Phonenumber'][2]->phonenumber = '123 456';
$users[7]->name = 'Edward Furlong';
$users[7]->Email->address = 'furlong@example.com';
$users[7]->Phonenumber[0]->phonenumber = '111 567 333';
$users->save();
\ No newline at end of file
../lib/
\ No newline at end of file
<?php
require_once('playground.php');
$dbh = new PDO('mysql:host=localhost;dbname=test', 'jwage', 'elite1baller');
$conn = Doctrine_Manager::connection($dbh);
$manager = Doctrine_Manager::getInstance();
$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
// Build models from schema
//$import = new Doctrine_Import_Schema();
//$import->generateBaseClasses(true);
//$import->importSchema('schema.yml', 'yml', 'test_models');
// Export models schema to database
//Doctrine::exportSchema('test_models');
// Load model classes
Doctrine::loadModels('test_models');
// Load data fixtures
$data = new Doctrine_Data();
$data->importData('fixtures.yml');
\ No newline at end of file
../models/
\ No newline at end of file
<?php
$models = Doctrine::loadModels('models');
$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
$tables = array('Entity',
'EntityReference',
'EntityAddress',
'Email',
'Phonenumber',
'Groupuser',
'Group',
'User',
'Album',
'Book',
'Author',
'Song',
'Element',
'Error',
'Description',
'Address',
'Account',
'Task',
'Resource',
'Assignment',
'ResourceType',
'ResourceReference');
$conn->export->exportClasses($tables);
\ No newline at end of file
<?php
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'doctrine/Doctrine.php';
spl_autoload_register(array('Doctrine', 'autoload'));
error_reporting(E_ALL | E_STRICT);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment