1
0
mirror of synced 2024-12-15 23:56:02 +03:00
doctrine2/manual/new/docs/en/getting-started/installation.txt

39 lines
1.8 KiB
Plaintext
Raw Normal View History

2007-06-13 02:18:21 +04:00
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>