public static function format($value, $formatType, $format) { if (!is_callable([__CLASS__, $formatType])) { throw new InvalidArgumentException('Unknown $formatType: "' . $formatType . '"!'); } return self::$formatType($value, $format); }
function formatValue() { $value = $this->getValue(); $format_type = $this->getFormatType(); if ($format_type != '') { $value = rex_formatter::format($value, $format_type, $this->getFormat()); } return $value; }