added Doctrine_Record::merge()
This commit is contained in:
parent
ae738ccb97
commit
8d6c72cdcd
1 changed files with 12 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue