1
0
mirror of synced 2025-01-18 06:21:40 +03:00
This commit is contained in:
zYne 2007-05-07 15:40:22 +00:00
parent e6d32b9f43
commit 1f24127189
2 changed files with 6 additions and 8 deletions

View File

@ -30,7 +30,7 @@ connection when no arguments have been speficied.
\$conn2 = Doctrine_Manager::connection(); \$conn2 = Doctrine_Manager::connection();
// \$conn2 == \$conn // $conn2 == $conn
?> ?>
</code> </code>
@ -47,7 +47,7 @@ The current connection is the lastly opened connection.
\$conn2 = \$manager->openConnection(new PDO('dsn2','username2','password2'), 'connection 2'); \$conn2 = \$manager->openConnection(new PDO('dsn2','username2','password2'), 'connection 2');
\$manager->getCurrentConnection(); // \$conn2 \$manager->getCurrentConnection(); // $conn2
?></code> ?></code>
@ -59,8 +59,8 @@ You can change the current connection by calling setCurrentConnection().
<code type="php"> <code type="php">
\$manager->setCurrentConnection('connection 1'); \$manager->setCurrentConnection('connection 1');
\$manager->getCurrentConnection(); // \$conn \$manager->getCurrentConnection(); // $conn
?>
</code> </code>
@ -76,5 +76,5 @@ special IteratorAggregate interface.
foreach(\$manager as \$conn) { foreach(\$manager as \$conn) {
} }
?></code> </code>

View File

@ -3,13 +3,11 @@ Every record that is retrieved from database is persistent and every newly creat
If a Doctrine_Record is retrieved from database but the only loaded property is its primary key, then this record If a Doctrine_Record is retrieved from database but the only loaded property is its primary key, then this record
has a state called proxy. has a state called proxy.
Every transient and persistent Doctrine_Record is either clean or dirty. Doctrine_Record is clean when none of its properties are changed and Every transient and persistent Doctrine_Record is either clean or dirty. Doctrine_Record is clean when none of its properties are changed and
dirty when atleast one of its properties has changed. dirty when atleast one of its properties has changed.
<code type="php"> <code type="php">
$state = $record->getState(); $state = $record->state();
switch($state): switch($state):
case Doctrine_Record::STATE_PROXY: case Doctrine_Record::STATE_PROXY: