private function _addAttributeToArray(array &$attributeArray, $name, $value)
{
// If multiple attributes exist, add as an array value
if (isset($attributeArray[$name])) {
// Initialize the array with the existing value
if (!is_array($attributeArray[$name])) {
$existingValue = $attributeArray[$name];
$attributeArray[$name] = array($existingValue);
}
$attributeArray[$name][] = trim($value);
} else {
$attributeArray[$name] = trim($value);
}
}