<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class PaginateUtil { public static function pack($YDsPC, $ho3D1, $wI1r0) { goto aG7ty; oO46Y: $ZIe4d['total'] = count($YDsPC); goto JmGJq; JmGJq: $GJZpW = $wI1r0 * ($ho3D1 - 1); goto wK2eN; uzs6t: $ZIe4d['page'] = $ho3D1; goto BmtKr; wK2eN: if ($GJZpW < 0 || $GJZpW >= count($YDsPC)) { $ZIe4d['records'] = array(); } else { $ZIe4d['records'] = array_slice($YDsPC, $GJZpW, $wI1r0); } goto sLuxm; sLuxm: return $ZIe4d; goto yJKkB; aG7ty: $ZIe4d = array(); goto uzs6t; BmtKr: $ZIe4d['pageSize'] = $wI1r0; goto oO46Y; yJKkB: } public static function pack1($YDsPC) { goto R0L2s; R0L2s: $ZIe4d = array(); goto LUaZY; Ty5u1: $ZIe4d['total'] = count($YDsPC); goto KqD4E; LUaZY: $ZIe4d['page'] = 1; goto jsGiD; jsGiD: $ZIe4d['pageSize'] = count($YDsPC); goto Ty5u1; eBndl: return $ZIe4d; goto J07ho; KqD4E: $ZIe4d['records'] = $YDsPC; goto eBndl; J07ho: } }