Commit af14bd3c authored by nicobn's avatar nicobn

Adjusted documentation with the recent change in the import/export methods name

parent 7b9eeb35
...@@ -66,7 +66,7 @@ spl_autoload_register(array('Doctrine', 'autoload')); ...@@ -66,7 +66,7 @@ spl_autoload_register(array('Doctrine', 'autoload'));
$manager = Doctrine_Manager::getInstance(); $manager = Doctrine_Manager::getInstance();
$conn = $manager->openConnection('pgsql://user:pass@localhost/test'); $conn = $manager->openConnection('pgsql://user:pass@localhost/test');
Doctrine::export('models'); Doctrine::exportSchema('models');
</code> </code>
This would execute the following queries on mysql. This would execute the following queries on mysql.
...@@ -99,7 +99,7 @@ $queries = Doctrine::exportSql('models'); ...@@ -99,7 +99,7 @@ $queries = Doctrine::exportSql('models');
print_r($queries); print_r($queries);
</code> </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"> <code type="php">
require_once('path-to-doctrine/lib/Doctrine.php'); require_once('path-to-doctrine/lib/Doctrine.php');
......
...@@ -32,7 +32,7 @@ $conn = Doctrine_Manager::connection('mysql://root:dc34@localhost/test'); ...@@ -32,7 +32,7 @@ $conn = Doctrine_Manager::connection('mysql://root:dc34@localhost/test');
// import method takes one parameter: the import directory (the directory where // import method takes one parameter: the import directory (the directory where
// the generated record files will be put in // the generated record files will be put in
$conn->import->import('myrecords'); $conn->import->importSchema('myrecords');
</code> </code>
That's it! Now there should be a file called File.php in your myrecords directory. The file should look like: That's it! Now there should be a file called File.php in your myrecords directory. The file should look like:
......
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