5329c3827c
* Fixed a few layout bugs in new documentation * Fixed documentation table of contents indentation bug in IE6 (fixes #344) * Fixed a parser bug in Sensei_Doc_Section * Restructrured a bit some files of the documentation.
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>
|