/**
* Returns an attribute information hash.
*
* @param integer $attribute_id An attribute ID.
*
* @return array The attribute hash.
* @throws Whups_Exception
*/
public function getAttributeDesc($attribute_id)
{
try {
$attribute = $this->_db->selectOne('SELECT attribute_name, attribute_description, ' . 'attribute_type, attribute_params, attribute_required ' . 'FROM whups_attributes_desc WHERE attribute_id = ?', array((int) $attribute_id));
} catch (Horde_Db_Exception $e) {
throw new Whups_Exception($e);
}
return array('id' => $attribute_id, 'name' => $this->_fromBackend($attribute['attribute_name']), 'description' => $this->_fromBackend($attribute['attribute_description']), 'type' => empty($attribute['attribute_type']) ? 'text' : $attribute['attribute_type'], 'params' => $this->_fromBackend(@unserialize($attribute['attribute_params'])), 'required' => (bool) $attribute['attribute_required']);
}