public function attributes($arAttr = null, $value = null)
{
if (is_array($arAttr)) {
$this->attributes = array_merge($this->attributes, $arAttr);
return $this;
} elseif (isset($value)) {
$this->attributes[$arAttr] = $value;
return $this;
} elseif ($arAttr) {
return isset($this->attributes[$arAttr]) ? $this->attributes[$arAttr] : null;
}
return $this->attributes;
}