1
0
mirror of synced 2024-12-13 06:46:03 +03:00

when using Doctrine::compile(), having the require_once()'s in the source files will break things. This is because the file hasn't been included, but the class has been defined in the compiled file. This means you have to rely on autoload to allow compile to function (or strip out all require_once's from the code on compile, but atleast one needs to be maintained). IMPORTANT: you MUST now use autoload.

This commit is contained in:
pookey 2006-09-03 22:37:54 +00:00
parent ae534f69ff
commit fb2a3bfde9
12 changed files with 10 additions and 22 deletions

View File

@ -463,9 +463,10 @@ final class Doctrine {
$fp = fopen($file, 'w');
if ($fp === false)
throw new Doctrine_Exception("Couldn't write compiled data. Failed to open $file");
fwrite($fp, "<?php ".implode('', $ret).
"\nclass InvalidKeyException extends Exception { }".
"\nclass DQLException extends Exception { }"
fwrite($fp, "<?php".
" class InvalidKeyException extends Exception { }".
" class DQLException extends Exception { }".
implode('', $ret)
);
fclose($fp);

View File

@ -1,5 +1,4 @@
<?php
require_once("Relation.php");
/**
* Doctrine_Association this class takes care of association mapping
* (= many-to-many relationships, where the relationship is handled with an additional relational table

View File

@ -18,8 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
require_once("Configurable.php");
require_once("Record.php");
/**
* Doctrine_Connection
*

View File

@ -1,5 +1,4 @@
<?php
require_once("Relation.php");
/**
* Foreign Key
*/

View File

@ -1,7 +1,5 @@
<?php
require_once("Relation.php");
/**
* Local Key
*/
class Doctrine_LocalKey extends Doctrine_Relation { }
?>

View File

@ -18,8 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
require_once("Configurable.php");
require_once("EventListener.php");
/**
* @package Doctrine ORM
* @url www.phpdoctrine.com

View File

@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
require_once("Hydrate.php");
/**
* Doctrine_Query
*

View File

@ -18,7 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
require_once("Hydrate.php");
/**
* Doctrine_RawSql
*

View File

@ -19,8 +19,6 @@
* <http://www.phpdoctrine.com>.
*/
require_once("Access.php");
/**
* Doctrine_Record
* All record classes should inherit this super class

View File

@ -18,8 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
require_once("Configurable.php");
require_once("Record.php");
/**
* Doctrine_Session
*

View File

@ -1,5 +1,4 @@
<?php
require_once("Access.php");
/**
* Doctrine_Statement
*

View File

@ -18,10 +18,7 @@
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.com>.
*/
require_once("Exception/Find.class.php");
require_once("Exception/Mapping.class.php");
require_once("Exception/PrimaryKey.class.php");
require_once("Configurable.php");
/**
* Doctrine_Table represents a database table
* each Doctrine_Table holds the information of foreignKeys and associations