<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class PaginateUtil { public static function pack($lz_pk, $l8Zr8, $MNp5Y) { goto zO6Kk; VvbMg: $Z5nZL['pageSize'] = $MNp5Y; goto DE2VS; EmOoc: return $Z5nZL; goto bTLiy; wdK2Y: $JCIt8 = $MNp5Y * ($l8Zr8 - 1); goto WG3z7; WG3z7: if ($JCIt8 < 0 || $JCIt8 >= count($lz_pk)) { $Z5nZL['records'] = array(); } else { $Z5nZL['records'] = array_slice($lz_pk, $JCIt8, $MNp5Y); } goto EmOoc; fEVt7: $Z5nZL['page'] = $l8Zr8; goto VvbMg; DE2VS: $Z5nZL['total'] = count($lz_pk); goto wdK2Y; zO6Kk: $Z5nZL = array(); goto fEVt7; bTLiy: } public static function pack1($lz_pk) { goto LZvsB; NMyNI: $Z5nZL['pageSize'] = count($lz_pk); goto JcZqv; Zbanb: $Z5nZL['page'] = 1; goto NMyNI; JcZqv: $Z5nZL['total'] = count($lz_pk); goto ExvNe; LZvsB: $Z5nZL = array(); goto Zbanb; EGjOe: return $Z5nZL; goto r26_F; ExvNe: $Z5nZL['records'] = $lz_pk; goto EGjOe; r26_F: } }