Commit b6521583 authored by doctrine's avatar doctrine

Doctrine::compile fix

parent 536f0117
......@@ -301,8 +301,10 @@ final class Doctrine {
}
}
/**
* method for making a single file of
* most used doctrine components
* method for making a single file of most used doctrine components
*
* including the compiled file instead of multiple files (in worst
* cases dozens of files) can improve performance by order of magnitude
*
* @throws Doctrine_Exception
* @return void
......@@ -339,13 +341,14 @@ final class Doctrine {
"ForeignKey",
"LocalKey",
"Association",
"DB");
"DB",
"DBStatement");
$ret = array();
foreach($classes as $class) {
if($class !== "Doctrine")
if($class !== 'Doctrine')
$class = 'Doctrine_'.$class;
$file = self::$path.DIRECTORY_SEPARATOR.str_replace("_",DIRECTORY_SEPARATOR,$class).".php";
......
......@@ -134,32 +134,4 @@ class Doctrine_DB extends PDO implements Countable, IteratorAggregate {
}
}
class Doctrine_DBStatement extends PDOStatement {
/**
* @param Doctrine_DB $dbh Doctrine Database Handler
*/
private $dbh;
/**
* @param Doctrine_DB $dbh
*/
private function __construct(Doctrine_DB $dbh) {
$this->dbh = $dbh;
}
/**
* @param array $params
*/
public function execute(array $params = array()) {
$time = microtime();
try {
$result = parent::execute($params);
} catch(PDOException $e) {
throw new Doctrine_Exception($this->queryString." ".$e->__toString());
}
$exectime = (microtime() - $time);
$this->dbh->addExecTime($exectime);
return $result;
}
}
?>
......@@ -83,6 +83,7 @@ $menu = array("Getting started" =>
array(
"Requirements",
"Installation",
"Compiling",
"Starting new project",
"Setting table definition" => array(
"Introduction",
......
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