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

Doctrine::compile() refactored

This commit is contained in:
zYne 2006-08-27 19:39:05 +00:00
parent 31bfa23340
commit 82c13ca1da

View File

@ -368,24 +368,14 @@ final class Doctrine {
throw new Doctrine_Exception("Couldn't compile $file. File $file does not exists.");
self::autoload($class);
$refl = new ReflectionClass($class);
$lines = file($file);
$refl = new ReflectionClass ( $class );
$lines = file( $file );
$start = $refl->getStartLine() - 1;
$end = $refl->getEndLine() - 2;
$ret = array_merge($ret,
array_slice($lines,
$refl -> getStartLine() - 1,
$refl -> getEndLine() - 2));
$i = 0;
while($i < count($lines)) {
$i++;
if($i < $start)
continue;
$ret[] = $lines[$i];
if($i > $end)
break;
}
}