public static function init($page, $total, $num = 10) { self::$page = max(1, $page); self::$start = $num * (self::$page - 1); self::$num = $num; self::$total = $total; self::$last = ceil($total / $num); }