lithium\data\Entity::set()

public method

Allows several properties to be assigned at once, i.e.:

$record->set(['title' => 'Lorem Ipsum', 'value' => 42]);

Parameters

  • array $data

    An associative array of fields and values to assign to this Entity instance.

Returns

void

Source

	public function set(array $data) {
		foreach ($data as $name => $value) {
			$this->__set($name, $value);
		}
	}