1
0
mirror of synced 2025-02-12 10:19:24 +03:00
doctrine2/playground/index.php

22 lines
667 B
PHP
Raw Normal View History

2007-09-13 16:55:32 +00:00
<?php
2007-09-19 16:26:28 +00:00
require_once('playground.php');
2007-10-08 18:40:14 +00:00
$dbh = new PDO('mysql:host=localhost;dbname=test', 'jwage', 'elite1baller');
$conn = Doctrine_Manager::connection($dbh);
$manager = Doctrine_Manager::getInstance();
2007-10-08 22:47:59 +00:00
$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
2007-10-08 22:47:59 +00:00
Doctrine::loadModels('test_models');
2007-10-08 18:40:14 +00:00
// Load data fixtures
2007-10-08 22:47:59 +00:00
$data = new Doctrine_Data();
$data->importData('fixtures.yml');