Commit 776c47f7 authored by doctrine's avatar doctrine

class dependency fix

parent e1548625
...@@ -226,7 +226,8 @@ final class Doctrine { ...@@ -226,7 +226,8 @@ final class Doctrine {
if(! self::$path) if(! self::$path)
self::$path = dirname(__FILE__); self::$path = dirname(__FILE__);
$dir = dir(self::$path); $path = self::$path.DIRECTORY_SEPARATOR."Doctrine";
$dir = dir($path);
$a = array(); $a = array();
while (false !== ($entry = $dir->read())) { while (false !== ($entry = $dir->read())) {
switch($entry): switch($entry):
...@@ -243,11 +244,11 @@ final class Doctrine { ...@@ -243,11 +244,11 @@ final class Doctrine {
case "DQL": case "DQL":
case "Sensei": case "Sensei":
case "Iterator": case "Iterator":
$a[] = self::$path.DIRECTORY_SEPARATOR.$entry; $a[] = $path.DIRECTORY_SEPARATOR.$entry;
break; break;
default: default:
if(is_file(self::$path.DIRECTORY_SEPARATOR.$entry) && substr($entry,-4) == ".php") { if(is_file($path.DIRECTORY_SEPARATOR.$entry) && substr($entry,-4) == ".php") {
require_once($entry); require_once($path.DIRECTORY_SEPARATOR.$entry);
} }
endswitch; endswitch;
} }
......
<?php <?php
require_once(Doctrine::getPath().DIRECTORY_SEPARATOR."Exception.php"); Doctrine::autoload('Doctrine_Exception');
/** /**
* thrown when user defined Doctrine_Table is badly named * thrown when user defined Doctrine_Table is badly named
*/ */
......
<?php <?php
require_once(Doctrine::getPath().DIRECTORY_SEPARATOR."Exception.php"); Doctrine::autoload('Doctrine_Exception');
/** /**
* thrown when Doctrine_Record is refreshed and the refreshed primary key doens't match the old one * thrown when Doctrine_Record is refreshed and the refreshed primary key doens't match the old one
*/ */
......
<?php <?php
require_once(Doctrine::getPath().DIRECTORY_SEPARATOR."Exception.php"); Doctrine::autoload('Doctrine_Exception');
/** /**
* thrown when user tries to get the current * thrown when user tries to get the current
* session and there are no open sessions * session and there are no open sessions
......
<?php <?php
require_once(Doctrine::getPath().DIRECTORY_SEPARATOR."Exception.php"); Doctrine::autoload('Doctrine_Exception');
/** /**
* thrown when user tries to initialize a new instance of Doctrine_Table, * thrown when user tries to initialize a new instance of Doctrine_Table,
* while there already exists an instance of that table * while there already exists an instance of that table
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment