public static function formatUrl($Url, $Page, $Limit = '')
{
// Check for new style page.
if (strpos($Url, '{Page}') !== false) {
return str_replace(array('{Page}', '{Size}'), array($Page, $Limit), $Url);
} else {
return sprintf($Url, $Page, $Limit);
}
}