From 9046569d680513b77965da83f075de94ff139560 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 3 Sep 2006 18:31:15 +0000 Subject: [PATCH] Doctrine::compile fixed --- Doctrine.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Doctrine.php b/Doctrine.php index d56e09964..be009af38 100644 --- a/Doctrine.php +++ b/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()."
"; } + $file = self::$path.DIRECTORY_SEPARATOR.'Doctrine.compiled.php'; - $fp = fopen(self::$path.DIRECTORY_SEPARATOR.'Doctrine.compiled.php', 'w+'); + $fp = fopen($file, 'w+'); fwrite($fp, ""); fclose($fp); + $stripped = php_strip_whitespace( $file ); + //print $stripped; + $fp = fopen($file, 'w+'); + fwrite($fp, $stripped); + fclose($fp); } /** * simple autoload function