Slide 17
Slide 17 text
__set()
__set()
/**
* @param string $name
* @param string|array|Traversable $value
* @throws LogicException
*/
public function __set($name, $value) {
switch ($name) {
case name : $this->setName($value); return;
case value : $this->setData((string)$value); return;
case values : $this->setData($value); return;
}
throw new LogicException(
sprintf(
'Can not write non existing property: %s::$%s',
__CLASS__,
$name
...