lithium\data\entity\Document::__set()
Overrides
lithium\data\Entity::__set()
PHP magic method used when setting properties on the Document
instance, i.e.
$document->title = 'Lorem Ipsum'
. If $value
is a complex data type (i.e. associative
array), it is wrapped in a sub-Document
object before being appended.
Parameters
-
$name
The
name of the field/property to write to, i.e.
title
in the above example. -
$value
The
value to write, i.e.
'Lorem Ipsum'
.
Returns
voidSource
public function __set($name, $value = null) {
$this->set([$name => $value]);
}