zendframework/zf2 — pull request #5417 by psfpro (2013-11-05 12:29:01+00:00)
Title: [Form] addAttribute function

Often have to do so:

if ($form->hasAttribute('class')) {
$form->setAttribute('class', $form->getAttribute('class') . ' form-horizontal');
} else {
$form->setAttribute('class', 'form-horizontal');
}

But it is much easier:

$form->addAttribute('class', 'form-horizontal');