Doctrine::compile fixed
This commit is contained in:
parent
c5e4f366d4
commit
9046569d68
17
Doctrine.php
17
Doctrine.php
@ -405,6 +405,7 @@ final class Doctrine {
|
||||
"Iterator",
|
||||
"Exception",
|
||||
"Access",
|
||||
"Null",
|
||||
"Record",
|
||||
"Record_Iterator",
|
||||
"Collection",
|
||||
@ -444,21 +445,31 @@ final class Doctrine {
|
||||
$refl = new ReflectionClass ( $class );
|
||||
$lines = file( $file );
|
||||
|
||||
$start = $refl -> getStartLine() - 1;
|
||||
$end = $refl -> getEndLine();
|
||||
|
||||
$ret = array_merge($ret,
|
||||
array_slice($lines,
|
||||
$refl -> getStartLine() - 1,
|
||||
$refl -> getEndLine() - 2));
|
||||
$start,
|
||||
($end - $start)));
|
||||
print $refl->getEndLine()."<br \>";
|
||||
|
||||
}
|
||||
|
||||
$file = self::$path.DIRECTORY_SEPARATOR.'Doctrine.compiled.php';
|
||||
|
||||
$fp = fopen(self::$path.DIRECTORY_SEPARATOR.'Doctrine.compiled.php', 'w+');
|
||||
$fp = fopen($file, 'w+');
|
||||
fwrite($fp, "<?php
|
||||
".implode('', $ret)."
|
||||
class InvalidKeyException extends Exception { }
|
||||
class DQLException extends Exception { }
|
||||
?>");
|
||||
fclose($fp);
|
||||
$stripped = php_strip_whitespace( $file );
|
||||
//print $stripped;
|
||||
$fp = fopen($file, 'w+');
|
||||
fwrite($fp, $stripped);
|
||||
fclose($fp);
|
||||
}
|
||||
/**
|
||||
* simple autoload function
|
||||
|
Loading…
Reference in New Issue
Block a user