public function __unset($name)
{
$setter = 'set' . $name;
if (method_exists($this, $setter)) {
$this->{$setter}(null);
return;
} else {
// behavior property
$this->ensureBehaviors();
foreach ($this->_behaviors as $behavior) {
if ($behavior->canSetProperty($name)) {
$behavior->{$name} = null;
return;
}
}
}
throw new InvalidCallException('Unsetting an unknown or read-only property: ' . get_class($this) . '::' . $name);
}