function call($callback)
{
if (is_callable($callback)) {
call_user_func($callback, self::$params);
} else {
$parts = explode(c::get('router.delimiter'), $callback);
$class = $parts[0];
$method = isset($parts[1]) ? $parts[1] : null;
if (class_exists($class)) {
$controller = new $class();
if ($method && method_exists($controller, $method)) {
$controller->{$method}(self::$params);
} else {
throw new BadMethodCallException('Method, ' . $method . ', not supported.');
}
} else {
throw new Exception('Class, ' . $class . ', not found.');
}
}
}