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

added Doctrine_Record::merge()

This commit is contained in:
doctrine 2006-08-06 20:55:54 +00:00
parent ae738ccb97
commit 8d6c72cdcd

View File

@ -1280,6 +1280,18 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
final public function hasColumn($name, $type, $length = 20, $options = "") {
$this->table->setColumn($name, $type, $length, $options);
}
/**
* merge
*
* @param array $values
*/
public function merge(array $values) {
foreach($this->table->getColumnNames() as $value) {
try {
$this->data[$value] = $values[$value];
} catch(Exception $e) { }
}
}
/**
* __call
* @param string $m