diff --git a/manual/docs/en/facade.txt b/manual/docs/en/facade.txt
index f4d439bba..3392a017f 100644
--- a/manual/docs/en/facade.txt
+++ b/manual/docs/en/facade.txt
@@ -42,6 +42,9 @@ Doctrine::generateModelsFromYaml('/path/to/schema.yml', '/path/to/generate/model
// Create all your tables from an existing set of models
Doctrine::createTablesFromModels('/path/to/models');
+// Create the tables supplied in the array
+Doctrine::createTablesFromArray(array('User', 'Phoneumber'));
+
// Generate string of sql commands from an existing set of models
Doctrine::generateSqlFromModels('/path/to/models');
@@ -207,4 +210,4 @@ Now you can begin executing commands.
./cli generate-models-from-yaml
./cli create-tables
-
\ No newline at end of file
+
diff --git a/manual/docs/en/getting-started.txt b/manual/docs/en/getting-started.txt
index 741daf0f1..30e837476 100644
--- a/manual/docs/en/getting-started.txt
+++ b/manual/docs/en/getting-started.txt
@@ -1,121 +1,6 @@
++ Requirements
Doctrine requires PHP >= 5.2. it doesn't require any external libraries. For database function call abstraction Doctrine uses PDO which is bundled with php by default.
-
++ Installation
-++ Compiling
-Doctrine is quite big framework and usually dozens of files are being included on each request. This brings a lot of overhead. In fact these file operations are as time consuming as sending multiple queries to database server. The clean separation of class per file works well in developing environment, however when project goes commercial distribution the speed overcomes the clean separation of class per file -convention.
-
-Doctrine offers method called {{compile()}} to solve this issue. The compile method makes a single file of most used Doctrine components which can then be included on top of your script. By default the file is created into Doctrine root by the name {{Doctrine.compiled.php}}.
-
-Compiling is a method for making a single file of most used doctrine runtime components including the compiled file instead of multiple files (in worst cases dozens of files) can improve performance by an order of magnitude. In cases where this might fail, a {{Doctrine_Exception}} is throw detailing the error.
-
-
-Doctrine::compile();
-// on some other script:
-require_once('path_to_doctrine/Doctrine.compiled.php');
-
++ Starting new project
++ Working with existing databases
++ Exporting classes
-+++ Introduction
-
-Doctrine supports exporting record classes into database. This means that based on the definitions given in your record definitions Doctrine will alter your database schema.
-
-Lets say we have a classes called User and Phonenumber with the following definitions:
-
-
-// file User.php
-class User extends Doctrine_Record
-{
- public function setTableDefinition()
- {
- $this->hasColumn('name', 'string', 20);
- }
- public function setUp()
- {
- $this->hasMany('Phonenumber', array('local' => 'id',
- 'foreign' => 'user_id'));
- }
-}
-// file Phonenumber.php
-class Phonenumber extends Doctrine_Record
-{
- public function setTableDefinition()
- {
- $this->hasColumn('phonenumber', 'string', 20);
- $this->hasColumn('user_id', 'integer');
- }
- public function setUp()
- {
- $this->hasOne('User', array('local' => 'user_id',
- 'foreign' => 'id',
- 'onDelete' => 'CASCADE'));
- }
-}
-
-
-Now lets say these classes are in directory 'models/'. We can make Doctrine to iterate through this directory and attach these classes into your database structure with the following script:
-
-
-
-require_once('path-to-doctrine/lib/Doctrine.php');
-
-spl_autoload_register(array('Doctrine', 'autoload'));
-
-// in order to export we need a database connection
-$manager = Doctrine_Manager::getInstance();
-$conn = $manager->openConnection('pgsql://user:pass@localhost/test');
-
-Doctrine::createTablesFromModels('models');
-
-
-This would execute the following queries on mysql.
-
-
-CREATE TABLE user (id BIGINT AUTO_INCREMENT, name VARCHAR(20), PRIMARY KEY(id), INDEX(id));
-CREATE TABLE phonenumber (id INT AUTO_INCREMENT, phonenumber VARCHAR(20), user_id BIGINT, PRIMARY KEY(id), INDEX(user_id));
-ALTER TABLE phonenumber ADD CONSTRAINT FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE;
-
-
-Pay attention to the following things:
-
-# The autoincrement primary key columns are auto-added since we didn't specify any primary key columns
-# Doctrine auto-adds indexes to the referenced relation columns (this is needed in mysql)
-
-+++ Getting export queries
-
-There might be situations where you don't want to execute the export queries immediately rather you want to get the query strings and maybe attach them to a build.sql file. This can be easily achieved as follows:
-
-
-require_once('path-to-doctrine/lib/Doctrine.php');
-
-spl_autoload_register(array('Doctrine', 'autoload'));
-
-$manager = Doctrine_Manager::getInstance();
-$conn = $manager->openConnection('pgsql://user:pass@localhost/test');
-
-$queries = Doctrine::generateSqlFromModels('models');
-
-echo $queries;
-
-
-Consider the same situation and you want to get the string of sql queries needed to perform the exporting. It can be achieved with Doctrine::generateSqlFromModels().
-
-+++ Export options
-
-
-// export everything, table definitions and constraints
-
-$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
-
-// export classes without constraints
-
-$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_TABLES ^
- Doctrine::EXPORT_CONSTRAINTS);
-
-// turn off exporting
-
-$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_NONE);
-
-$sql = Doctrine::generateSqlFromModels();
-
diff --git a/manual/docs/en/getting-started/exporting-classes.txt b/manual/docs/en/getting-started/exporting-classes.txt
new file mode 100644
index 000000000..728537474
--- /dev/null
+++ b/manual/docs/en/getting-started/exporting-classes.txt
@@ -0,0 +1,101 @@
++++ Introduction
+
+Doctrine supports exporting record classes into database. This means that based on the definitions given in your record definitions Doctrine will alter your database schema.
+
+Lets say we have a classes called User and Phonenumber with the following definitions:
+
+
+// file User.php
+class User extends Doctrine_Record
+{
+ public function setTableDefinition()
+ {
+ $this->hasColumn('name', 'string', 20);
+ }
+ public function setUp()
+ {
+ $this->hasMany('Phonenumber', array('local' => 'id',
+ 'foreign' => 'user_id'));
+ }
+}
+// file Phonenumber.php
+class Phonenumber extends Doctrine_Record
+{
+ public function setTableDefinition()
+ {
+ $this->hasColumn('phonenumber', 'string', 20);
+ $this->hasColumn('user_id', 'integer');
+ }
+ public function setUp()
+ {
+ $this->hasOne('User', array('local' => 'user_id',
+ 'foreign' => 'id',
+ 'onDelete' => 'CASCADE'));
+ }
+}
+
+
+Now lets say these classes are in directory 'models/'. We can make Doctrine to iterate through this directory and attach these classes into your database structure with the following script:
+
+
+
+require_once('path-to-doctrine/lib/Doctrine.php');
+
+spl_autoload_register(array('Doctrine', 'autoload'));
+
+//in order to export we need a database connection
+Doctrine_Manager::connection('mysql://user:pass@localhost/test');
+
+Doctrine::createTablesFromModels('models');
+
+
+This would execute the following queries on mysql.
+
+
+CREATE TABLE user (id BIGINT AUTO_INCREMENT, name VARCHAR(20), PRIMARY KEY(id), INDEX(id));
+CREATE TABLE phonenumber (id INT AUTO_INCREMENT, phonenumber VARCHAR(20), user_id BIGINT, PRIMARY KEY(id), INDEX(user_id));
+ALTER TABLE phonenumber ADD CONSTRAINT FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE;
+
+
+Pay attention to the following things:
+
+# The autoincrement primary key columns are auto-added since we didn't specify any primary key columns
+# Doctrine auto-adds indexes to the referenced relation columns (this is needed in mysql)
+
++++ Getting export queries
+
+There might be situations where you don't want to execute the export queries immediately rather you want to get the query strings and maybe attach them to a build.sql file. This can be easily achieved as follows:
+
+
+require_once('path-to-doctrine/lib/Doctrine.php');
+
+spl_autoload_register(array('Doctrine', 'autoload'));
+
+Doctrine_Manager::connection('mgsql://user:pass@localhost/test');
+
+$queries = Doctrine::generateSqlFromModels('models');
+
+echo $queries;
+
+
+Consider the same situation and you want to get the string of sql queries needed to perform the exporting. It can be achieved with Doctrine::generateSqlFromModels().
+
++++ Export options
+
+
+// export everything, table definitions and constraints
+$manager = Doctrine_Manager::getInstance();
+
+$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
+
+// export classes without constraints
+
+$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_TABLES ^
+ Doctrine::EXPORT_CONSTRAINTS);
+
+// turn off exporting
+
+$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_NONE);
+
+$sql = Doctrine::generateSqlFromModels();
+
diff --git a/manual/docs/en/getting-started/installation.txt b/manual/docs/en/getting-started/installation.txt
index 32e56f47f..e47af1477 100644
--- a/manual/docs/en/getting-started/installation.txt
+++ b/manual/docs/en/getting-started/installation.txt
@@ -13,27 +13,3 @@ If you do not have a SVN client, chose one from the list below. Find the **Check
* [http://tortoisesvn.tigris.org/ TortoiseSVN] a Windows application that integrates into Windows Explorer
* [http://www.apple.com/downloads/macosx/development_tools/svnx.html svnx] a Mac OS X GUI svn application
* Eclipse has SVN integration through the [http://subclipse.tigris.org/ subeclipse] plugin
-
-+++ Include and autoload
-
-In order to use Doctrine in your project it must first be included.
-
-
-require_once('path-to-doctrine/lib/Doctrine.php');
-
-
-Doctrine support [http://www.php.net/autoload Autoloading] for including files so that you do not have to include anything more then the base file. There are two different strategies that can be used to do this:
-
-If you do use the **__autoload** function for your own logic you can use it.
-
-
-function __autoload($class) {
- Doctrine::autoload($class);
-}
-
-
-If your project uses autoload and/or you have other libraries that use it you could use [http://www.php.net/manual/en/function.spl-autoload-register.php spl_autoload_register] to register more then one autoloading function.
-
-
-spl_autoload_register(array('Doctrine', 'autoload'));
-
diff --git a/manual/docs/en/getting-started/starting-new-project.txt b/manual/docs/en/getting-started/starting-new-project.txt
index 20eab1974..759fbce30 100644
--- a/manual/docs/en/getting-started/starting-new-project.txt
+++ b/manual/docs/en/getting-started/starting-new-project.txt
@@ -24,14 +24,18 @@ class User extends Doctrine_Record
For exporting the user class into database we need a simple build script:
+//require the base Doctrine class
require_once('lib/Doctrine.php');
-require_once('User.php');
+//register the autoloader
spl_autoload_register(array('Doctrine', 'autoload'));
-$conn = Doctrine_Manager::connection('pgsql://user:pass@localhost/test');
+require_once('User.php');
-$conn->export->exportClasses(array('User'));
+//set up a connection
+Doctrine_Manager::connection('mysql://user:pass@localhost/test');
+
+//export the classes
+Doctrine::createTablesFromArray(array('User'));
-
We now have a user model that supports basic CRUD opperations!
diff --git a/manual/docs/en/getting-started/working-with-existing-databases.txt b/manual/docs/en/getting-started/working-with-existing-databases.txt
index c766e7149..2274f6a66 100644
--- a/manual/docs/en/getting-started/working-with-existing-databases.txt
+++ b/manual/docs/en/getting-started/working-with-existing-databases.txt
@@ -28,11 +28,11 @@ Now we would like to convert it into Doctrine record class. It can be achieved e
require_once('lib/Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload'));
-$conn = Doctrine_Manager::connection('mysql://root:dc34@localhost/test');
+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->importSchema('myrecords');
+Doctrine::generateModelsFromDb('myrecords');
That's it! Now there should be a file called File.php in your myrecords directory. The file should look like:
diff --git a/manual/docs/en/improving-performance.txt b/manual/docs/en/improving-performance.txt
index 99282ad1b..04d378e12 100644
--- a/manual/docs/en/improving-performance.txt
+++ b/manual/docs/en/improving-performance.txt
@@ -1,5 +1,6 @@
++ Introduction
+++ Compile
++ Fetch only what you need
++ Bundle your class files
++ Use a bytecode cache
-++ Other tips
\ No newline at end of file
+++ Other tips
diff --git a/manual/docs/en/improving-performance/bundle-your-class-files.txt b/manual/docs/en/improving-performance/bundle-your-class-files.txt
index 313fe8bb6..2ae24c696 100644
--- a/manual/docs/en/improving-performance/bundle-your-class-files.txt
+++ b/manual/docs/en/improving-performance/bundle-your-class-files.txt
@@ -1 +1 @@
-When using Doctrine or any other large OO library or framework the number of files that need to be included on a regular HTTP request rises significantly. 50-100 includes per request are not uncommon. This has a significant performance impact because it results in a lot of disk operations. While this is generally no issue in a dev environment, it's not suited for production. The recommended way to handle this problem is to bundle the most-used classes of your libraries into a single file for production, stripping out any unnecessary whitespaces, linebreaks and comments. This way you get a significant performance improvement even without a bytecode cache (see next section). The best way to create such a bundle is probably as part of an automated build process i.e. with Phing.
\ No newline at end of file
+When using Doctrine or any other large OO library or framework the number of files that need to be included on a regular HTTP request rises significantly. 50-100 includes per request are not uncommon. This has a significant performance impact because it results in a lot of disk operations. While this is generally no issue in a dev environment, it's not suited for production. The recommended way to handle this problem is to bundle the most-used classes of your libraries into a single file for production, stripping out any unnecessary whitespaces, linebreaks and comments. This way you get a significant performance improvement even without a bytecode cache (see next section). The best way to create such a bundle is probably as part of an automated build process i.e. with Phing.
diff --git a/manual/docs/en/improving-performance/compile.txt b/manual/docs/en/improving-performance/compile.txt
new file mode 100644
index 000000000..1560b45ba
--- /dev/null
+++ b/manual/docs/en/improving-performance/compile.txt
@@ -0,0 +1,11 @@
+Doctrine is quite big framework and usually dozens of files are being included on each request. This brings a lot of overhead. In fact these file operations are as time consuming as sending multiple queries to database server. The clean separation of class per file works well in developing environment, however when project goes commercial distribution the speed overcomes the clean separation of class per file -convention.
+
+Doctrine offers method called {{compile()}} to solve this issue. The compile method makes a single file of most used Doctrine components which can then be included on top of your script. By default the file is created into Doctrine root by the name {{Doctrine.compiled.php}}.
+
+Compiling is a method for making a single file of most used doctrine runtime components including the compiled file instead of multiple files (in worst cases dozens of files) can improve performance by an order of magnitude. In cases where this might fail, a {{Doctrine_Exception}} is throw detailing the error.
+
+
+Doctrine::compile();
+// on some other script:
+require_once('path_to_doctrine/Doctrine.compiled.php');
+