9b61957154
- [doc getting-started:installation], or - [doc getting-started:installation Custom link text] - Updated Text_Wiki to 1.2.0 - Documentation should now pass XHTML validator - Formatted DSN section so that it's easier on eyes - The single quotes in <code type='php'> won't work anymore due to the Text_Wiki update. Use double quotes instead: <code type="php">. The single quotes have been converted to double quotes in documentation files. - Modified the links in h1-h6 headings to use the same style as the headings. - Some refactoring
40 lines
1.8 KiB
Plaintext
40 lines
1.8 KiB
Plaintext
The installation of doctrine is very easy. Just get the latest revision of Doctrine from http://doctrine.pengus.net/svn/trunk.
|
|
|
|
You need a SVN (Subversion) client for downloading Doctrine.
|
|
|
|
In order to check out Doctrine in the current directory using the **svn** command line tool use the following code:
|
|
|
|
<code type="bash">
|
|
svn co http://doctrine.pengus.net/svn/trunk .
|
|
</code>
|
|
|
|
If you do not have a SVN client, chose one from the list below. Find the **Checkout** option and enter http://doctrine.pengus.net/svn/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://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.
|
|
|
|
<code type="php">
|
|
require_once('path-to-doctrine/lib/Doctrine.php');
|
|
</code>
|
|
|
|
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.
|
|
|
|
<code type="php">
|
|
function __autoload($class) {
|
|
Doctrine::autoload($class);
|
|
}
|
|
</code>
|
|
|
|
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.
|
|
|
|
<code type="php">
|
|
spl_autoload_register(array('Doctrine', 'autoload'));
|
|
</code>
|