added Doctrine_Record::merge()
This commit is contained in:
parent
ae738ccb97
commit
8d6c72cdcd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user