<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class PaginateUtil { public static function pack($AMtla, $BcS7S, $ibxOT) { goto i1foE; MGU5s: $JOw_A['page'] = $BcS7S; goto LjOE8; LjOE8: $JOw_A['pageSize'] = $ibxOT; goto ZBaV3; i1foE: $JOw_A = array(); goto MGU5s; ZBaV3: $JOw_A['total'] = count($AMtla); goto us6Rs; us6Rs: $mTKI1 = $ibxOT * ($BcS7S - 1); goto Wkk1E; UNcBY: return $JOw_A; goto PvnEn; Wkk1E: if ($mTKI1 < 0 || $mTKI1 >= count($AMtla)) { $JOw_A['records'] = array(); } else { $JOw_A['records'] = array_slice($AMtla, $mTKI1, $ibxOT); } goto UNcBY; PvnEn: } public static function pack1($AMtla) { goto xW1iG; xW1iG: $JOw_A = array(); goto wuaj1; FHc6k: $JOw_A['pageSize'] = count($AMtla); goto luUjD; KNcqe: $JOw_A['records'] = $AMtla; goto PUTAC; luUjD: $JOw_A['total'] = count($AMtla); goto KNcqe; wuaj1: $JOw_A['page'] = 1; goto FHc6k; PUTAC: return $JOw_A; goto tTv8y; tTv8y: } }