This class consists of two static calls to methods which capture and sanitize URL parameters, and a helper method. It is used by both index.php as well as json.php:
namespace Application; use DateTime; use DateInterval; class Main extends Base {
The first method calls the second one, and builds the URL which is then used by jQuery DataTables as its AJAX target:
public static function buildUrl(&$start_date, &$end_date, &$limit) { self::getUrlParams($start_date, $end_date, $limit); return self::DEFAULT_URL . '?start_date=' . $start_date . '&end_date=' . $end_date . '&limit=' . $limit; }
The second method captures and sanitizes URL parameters which represent start and end dates, plus the results limit:
public static function ...