lithium\data\Collection::set()
Allows several items to be assigned at once.
For example:
$collection->set(array(
42 => array('title' => 'Lorem Ipsum'),
43 => array('title' => 'Dolor Amet')
));
Parameters
-
arary
$values
An associative array of fields and values to assign to the
Collection
.
Returns
voidSource
public function set($values) {
foreach ($values as $key => $val) {
$this[$key] = $val;
}
}