public static function get_handler_class($type = null)
{
if (!$type) {
$type = self::get_option('bbsub_handler_type', false);
}
$handlers = self::get_handlers();
if (empty($type)) {
throw new Exception(__('No handler set in the options', 'bbsub'));
}
if (!isset($handlers[$type])) {
throw new Exception(__('Handler could not be found.', 'bbsub'));
}
return $handlers[$type];
}