private function rewriteColumn($key, &$val)
 {
     if (isset($this->resultColumns[$key]['type'])) {
         switch (strtolower($this->resultColumns[$key]['type'])) {
             case 'url':
                 if (isset($val) && strlen($val)) {
                     $val = (string) AppKitXmlTag::create('a', $val)->addAttribute('href', $val)->addAttribute('target', '_blank');
                 }
                 break;
             case 'boolean':
             case 'bool':
                 $val = (bool) $val == true ? $this->tm->_('True') : $this->tm->_('False');
                 break;
             case 'timestamp':
             case 'datetime':
                 $check = strtotime($val);
                 if ($check <= 0) {
                     $val = '(null)';
                 } else {
                     $val = $this->tm->_d($val, 'date-tstamp');
                 }
                 break;
             case 'hoststate':
                 $val = (string) IcingaHostStateInfo::Create((int) $val)->getCurrentStateAsHtml();
                 break;
             case 'servicestate':
                 $val = (string) IcingaServiceStateInfo::Create((int) $val)->getCurrentStateAsHtml();
                 break;
             case 'checktype':
                 $val = $this->tm->_(IcingaConstantResolver::activeCheckType($val));
                 break;
             case 'float':
                 $val = sprintf('%.2f', $val);
                 break;
         }
     }
     return $val;
 }