<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class PaginateUtil { public static function pack($bcEDt, $FGtwZ, $UuKEc) { goto HkzLQ; VjaNR: $f3Nqc['page'] = $FGtwZ; goto u4WVj; HkzLQ: $f3Nqc = array(); goto VjaNR; fwnYx: $GcZ1R = $UuKEc * ($FGtwZ - 1); goto xZk1v; AG3go: $f3Nqc['total'] = count($bcEDt); goto fwnYx; xZk1v: if ($GcZ1R < 0 || $GcZ1R >= count($bcEDt)) { $f3Nqc['records'] = array(); } else { $f3Nqc['records'] = array_slice($bcEDt, $GcZ1R, $UuKEc); } goto ZT53E; ZT53E: return $f3Nqc; goto eC0oX; u4WVj: $f3Nqc['pageSize'] = $UuKEc; goto AG3go; eC0oX: } public static function pack1($bcEDt) { goto uzZlw; R6Ue4: $f3Nqc['records'] = $bcEDt; goto NJiY_; qTz7R: $f3Nqc['pageSize'] = count($bcEDt); goto CqiOd; CqiOd: $f3Nqc['total'] = count($bcEDt); goto R6Ue4; uzZlw: $f3Nqc = array(); goto L3m4B; NJiY_: return $f3Nqc; goto dPDTt; L3m4B: $f3Nqc['page'] = 1; goto qTz7R; dPDTt: } }