public function setType($type)
{
$type = strtolower($type);
switch ($type) {
case 'decimal':
$this->setViewState('Type', 'd', '');
break;
case 'currency':
$this->setViewState('Type', 'c', '');
break;
case 'percentage':
$this->setViewState('Type', 'p', '');
break;
case 'scientific':
$this->setViewState('Type', 'e', '');
break;
default:
throw new TInvalidDataValueException('numberformat_type_invalid', $type);
}
}