public function modify(array $structure)
{
if (TRUE === isset($structure['options']) && TRUE === is_array($structure['options'])) {
foreach ($structure['options'] as $name => $value) {
$this->setVariable($name, $value);
}
unset($structure['options']);
}
foreach ($structure as $propertyName => $propertyValue) {
$setterMethodName = ObjectAccess::buildSetterMethodName($propertyName);
if (TRUE === method_exists($this, $setterMethodName)) {
ObjectAccess::setProperty($this, $propertyName, $propertyValue);
}
}
return $this;
}