Adjusted documentation with the recent change in the import/export methods name
This commit is contained in:
parent
7b9eeb35bf
commit
af14bd3c13
@ -66,7 +66,7 @@ spl_autoload_register(array('Doctrine', 'autoload'));
|
||||
$manager = Doctrine_Manager::getInstance();
|
||||
$conn = $manager->openConnection('pgsql://user:pass@localhost/test');
|
||||
|
||||
Doctrine::export('models');
|
||||
Doctrine::exportSchema('models');
|
||||
</code>
|
||||
|
||||
This would execute the following queries on mysql.
|
||||
@ -99,7 +99,7 @@ $queries = Doctrine::exportSql('models');
|
||||
print_r($queries);
|
||||
</code>
|
||||
|
||||
Notice that the methods Doctrine::export() and Doctrine::exportSql() are just short cuts for Doctrine_Export::export() and Doctrine_Export::exportSql(). So the following code is equivalent with the previous example:
|
||||
Note that the methods Doctrine::exportSchema() and Doctrine::exportSql() are just short cuts for Doctrine_Export::exportSchema() and Doctrine_Export::exportSql(). So the following code is equivalent with the previous example:
|
||||
<code type="php">
|
||||
require_once('path-to-doctrine/lib/Doctrine.php');
|
||||
|
||||
|
@ -32,7 +32,7 @@ $conn = Doctrine_Manager::connection('mysql://root:dc34@localhost/test');
|
||||
|
||||
// import method takes one parameter: the import directory (the directory where
|
||||
// the generated record files will be put in
|
||||
$conn->import->import('myrecords');
|
||||
$conn->import->importSchema('myrecords');
|
||||
</code>
|
||||
|
||||
That's it! Now there should be a file called File.php in your myrecords directory. The file should look like:
|
||||
|
Loading…
x
Reference in New Issue
Block a user