public function registerFormatter($name, $class)
    {
        $name = strtolower(is_array($name) ? implode('-', $name) : $name);
        if (array_key_exists($name, static::$formatters)) {
            throw new \RuntimeException(sprintf('Formatter %s already registered.', $class));
        }
        static::$formatters[$name] = $class;

        return $this;
    }