1
0
mirror of synced 2025-01-18 06:21:40 +03:00

Doctrine::compile fix

This commit is contained in:
doctrine 2006-08-07 22:03:55 +00:00
parent 536f011764
commit b65215830d
3 changed files with 8 additions and 32 deletions

View File

@ -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";

View File

@ -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;
}
}
?>

View File

@ -83,6 +83,7 @@ $menu = array("Getting started" =>
array(
"Requirements",
"Installation",
"Compiling",
"Starting new project",
"Setting table definition" => array(
"Introduction",