public function fromArray($values, $arrayKeyValue = null)
{
if ($this->arrayKey && null !== $arrayKeyValue) {
$this->setArrayKeyValue($arrayKeyValue);
}
if (!is_array($values)) {
if (null !== $this->nodeValueVar) {
$setter = 'set' . ucfirst($this->nodeValueVar);
if (method_exists($this, $setter)) {
$this->{$setter}($values);
}
}
} else {
foreach ($values as $key => $value) {
$this->propertyFromArray($key, $value);
}
}
}