Commit 8d6c72cd authored by doctrine's avatar doctrine

added Doctrine_Record::merge()

parent ae738ccb
...@@ -1280,6 +1280,18 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite ...@@ -1280,6 +1280,18 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
final public function hasColumn($name, $type, $length = 20, $options = "") { final public function hasColumn($name, $type, $length = 20, $options = "") {
$this->table->setColumn($name, $type, $length, $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 * __call
* @param string $m * @param string $m
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment