1
0
mirror of synced 2024-12-14 07:06:04 +03:00

Updates in Getting Started manual chapter (fixes #794)

This commit is contained in:
guilhermeblanco 2008-02-19 02:41:37 +00:00
parent ebdb97b969
commit 280e7d5e17
3 changed files with 45 additions and 9 deletions

View File

@ -1,7 +1,15 @@
The installation of doctrine is very easy. Just get the latest revision of There are currently two different methods to install Doctrine.
Doctrine from http://svn.phpdoctrine.org/trunk.
You need a SVN (Subversion) client for downloading Doctrine. * SVN (subversion)
* SVN externals
It is recommended to download Doctrine via SVN (subversion), because in this case updating is easy.
If your project is already under version control with SVN, you should choose SVN externals.
+++ SVN
The installation of doctrine via SVN is very easy. Just get the latest revision of Doctrine from http://svn.phpdoctrine.org/trunk.
In order to check out Doctrine in the current directory using the **svn** command line tool use the following code: In order to check out Doctrine in the current directory using the **svn** command line tool use the following code:
@ -9,9 +17,37 @@ In order to check out Doctrine in the current directory using the **svn** comman
svn co http://svn.phpdoctrine.org/trunk . svn co http://svn.phpdoctrine.org/trunk .
</code> </code>
If you do not have a SVN client, chose one from the list below. Find the If you do not have a SVN client, chose one from the list below. Find the **Checkout** option and enter svn.phpdoctrine.org/trunk in the **path** or **repository url** parameter. There is no need for a username or password to check out Doctrine.
**Checkout** option and enter http://svn.phpdoctrine.org/trunk in the **path** or **repository url** parameter. There is no need for a username or password to check out Doctrine.
* [http://tortoisesvn.tigris.org/ TortoiseSVN] a Windows application that integrates into Windows Explorer * [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 * [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 * Eclipse has SVN integration through the [http://subclipse.tigris.org/ subeclipse] plugin
You can update to the latest version with
<code type="bash">
svn update
</code>
in your doctrine directory.
+++ SVN externals
If your project is under version control with SVN, you should set up doctrine via svn externals. You can do this with the **svn** command line tool:
<code type="bash">
svn pe svn:externals /path/to/project
</code>
You have to put the following line in the editor and save the changes.
<code>
doctrine http://svn.phpdoctrine.org/trunk
</code>
Afterwards you can download doctrine with
<code>
svn update
</code>

View File

@ -25,7 +25,7 @@ For exporting the user class into database we need a simple build script:
<code type="php"> <code type="php">
//require the base Doctrine class //require the base Doctrine class
require_once('lib/Doctrine.php'); require_once('path-to-doctrine/lib/Doctrine.php');
//register the autoloader //register the autoloader
spl_autoload_register(array('Doctrine', 'autoload')); spl_autoload_register(array('Doctrine', 'autoload'));

View File

@ -25,7 +25,7 @@ CREATE TABLE file (
Now we would like to convert it into Doctrine record class. It can be achieved easily with the following code snippet: Now we would like to convert it into Doctrine record class. It can be achieved easily with the following code snippet:
<code type="php"> <code type="php">
require_once('lib/Doctrine.php'); require_once('path-to-doctrine/lib/Doctrine.php');
spl_autoload_register(array('Doctrine', 'autoload')); spl_autoload_register(array('Doctrine', 'autoload'));
Doctrine_Manager::connection('mysql://root:dc34@localhost/test'); Doctrine_Manager::connection('mysql://root:dc34@localhost/test');