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:
parent
ae534f69ff
commit
fb2a3bfde9
@ -463,9 +463,10 @@ final class Doctrine {
|
|||||||
$fp = fopen($file, 'w');
|
$fp = fopen($file, 'w');
|
||||||
if ($fp === false)
|
if ($fp === false)
|
||||||
throw new Doctrine_Exception("Couldn't write compiled data. Failed to open $file");
|
throw new Doctrine_Exception("Couldn't write compiled data. Failed to open $file");
|
||||||
fwrite($fp, "<?php ".implode('', $ret).
|
fwrite($fp, "<?php".
|
||||||
"\nclass InvalidKeyException extends Exception { }".
|
" class InvalidKeyException extends Exception { }".
|
||||||
"\nclass DQLException extends Exception { }"
|
" class DQLException extends Exception { }".
|
||||||
|
implode('', $ret)
|
||||||
);
|
);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once("Relation.php");
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_Association this class takes care of association mapping
|
* Doctrine_Association this class takes care of association mapping
|
||||||
* (= many-to-many relationships, where the relationship is handled with an additional relational table
|
* (= many-to-many relationships, where the relationship is handled with an additional relational table
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
* and is licensed under the LGPL. For more information, see
|
* and is licensed under the LGPL. For more information, see
|
||||||
* <http://www.phpdoctrine.com>.
|
* <http://www.phpdoctrine.com>.
|
||||||
*/
|
*/
|
||||||
require_once("Configurable.php");
|
|
||||||
require_once("Record.php");
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_Connection
|
* Doctrine_Connection
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once("Relation.php");
|
|
||||||
/**
|
/**
|
||||||
* Foreign Key
|
* Foreign Key
|
||||||
*/
|
*/
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once("Relation.php");
|
|
||||||
/**
|
/**
|
||||||
* Local Key
|
* Local Key
|
||||||
*/
|
*/
|
||||||
class Doctrine_LocalKey extends Doctrine_Relation { }
|
class Doctrine_LocalKey extends Doctrine_Relation { }
|
||||||
?>
|
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
* and is licensed under the LGPL. For more information, see
|
* and is licensed under the LGPL. For more information, see
|
||||||
* <http://www.phpdoctrine.com>.
|
* <http://www.phpdoctrine.com>.
|
||||||
*/
|
*/
|
||||||
require_once("Configurable.php");
|
|
||||||
require_once("EventListener.php");
|
|
||||||
/**
|
/**
|
||||||
* @package Doctrine ORM
|
* @package Doctrine ORM
|
||||||
* @url www.phpdoctrine.com
|
* @url www.phpdoctrine.com
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* and is licensed under the LGPL. For more information, see
|
* and is licensed under the LGPL. For more information, see
|
||||||
* <http://www.phpdoctrine.com>.
|
* <http://www.phpdoctrine.com>.
|
||||||
*/
|
*/
|
||||||
require_once("Hydrate.php");
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_Query
|
* Doctrine_Query
|
||||||
*
|
*
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* and is licensed under the LGPL. For more information, see
|
* and is licensed under the LGPL. For more information, see
|
||||||
* <http://www.phpdoctrine.com>.
|
* <http://www.phpdoctrine.com>.
|
||||||
*/
|
*/
|
||||||
require_once("Hydrate.php");
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_RawSql
|
* Doctrine_RawSql
|
||||||
*
|
*
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
* <http://www.phpdoctrine.com>.
|
* <http://www.phpdoctrine.com>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("Access.php");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_Record
|
* Doctrine_Record
|
||||||
* All record classes should inherit this super class
|
* All record classes should inherit this super class
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
* and is licensed under the LGPL. For more information, see
|
* and is licensed under the LGPL. For more information, see
|
||||||
* <http://www.phpdoctrine.com>.
|
* <http://www.phpdoctrine.com>.
|
||||||
*/
|
*/
|
||||||
require_once("Configurable.php");
|
|
||||||
require_once("Record.php");
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_Session
|
* Doctrine_Session
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once("Access.php");
|
|
||||||
/**
|
/**
|
||||||
* Doctrine_Statement
|
* Doctrine_Statement
|
||||||
*
|
*
|
||||||
|
@ -18,10 +18,7 @@
|
|||||||
* and is licensed under the LGPL. For more information, see
|
* and is licensed under the LGPL. For more information, see
|
||||||
* <http://www.phpdoctrine.com>.
|
* <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
|
* Doctrine_Table represents a database table
|
||||||
* each Doctrine_Table holds the information of foreignKeys and associations
|
* each Doctrine_Table holds the information of foreignKeys and associations
|
||||||
|
Loading…
Reference in New Issue
Block a user