Adds attributes
array $attributes An array of attributes:
string A comma separated list of attributes
private function addAttributes($attributes) {
$code = array();
foreach ($attributes as $k => $v) {
$code[] = sprintf('%s="%s"', $k, $v);
}
return $code ? ', ' . implode(', ', $code) : '';
}