<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Input; use ModStart\Core\Util\StrUtil; use ModStart\Core\Util\TimeUtil; class ArrayPackage { private $data; private $cursor = 0; public function __construct($dTnlu) { $this->data = $dTnlu; } public static function build($dTnlu) { goto JyZBl; JyZBl: $ORdRI = new ArrayPackage($dTnlu); goto MxAv_; MxAv_: $ORdRI->cursor = 0; goto xQFpp; xQFpp: return $ORdRI; goto izqk_; izqk_: } public function resetCursor() { $this->cursor = 0; } public function next($Z1lY2 = null) { goto E5uSR; dJB0k: $this->cursor++; goto ukNqS; ukNqS: if (isset($this->data[$C6OV7])) { return $this->data[$C6OV7]; } goto k8eku; E5uSR: $C6OV7 = $this->cursor; goto dJB0k; k8eku: return $Z1lY2; goto LGbwb; LGbwb: } public function nextTrimString($Z1lY2 = null) { goto h033w; FHGn3: $cBDsM = @trim((string) $cBDsM); goto m0Bop; m0Bop: $cBDsM = StrUtil::filterSpecialChars($cBDsM); goto gPCAi; gPCAi: return $cBDsM; goto eFfqO; h033w: $cBDsM = $this->next($Z1lY2); goto FAJPq; FAJPq: if (null === $cBDsM) { return $Z1lY2; } goto FHGn3; eFfqO: } public function nextTrimStringMapInteger($Cqrew = array(), $Z1lY2 = null) { goto aHDKf; vDsUK: return $Z1lY2; goto PiAbT; aHDKf: $cBDsM = $this->nextTrimString(); goto FByaN; FByaN: if (isset($Cqrew[$cBDsM])) { return $Cqrew[$cBDsM]; } goto vDsUK; PiAbT: } public function nextType($xc6uF, $Z1lY2 = null) { goto SYeqk; yHNKP: foreach ($xOkS0 as $lxIPA => $knQyJ) { if ($cBDsM == $lxIPA) { return $lxIPA; } } goto CjAb1; SYeqk: $cBDsM = $this->nextTrimString(); goto QvUnO; QvUnO: $xOkS0 = $xc6uF::getList(); goto yHNKP; CjAb1: return $Z1lY2; goto XuMvT; XuMvT: } public function nextTypeValue($xc6uF, $Z1lY2 = null) { goto ccD6E; ccD6E: $cBDsM = $this->nextTrimString(); goto zNiGw; kLCPA: return $Z1lY2; goto Bg3O1; zNiGw: $xOkS0 = $xc6uF::getList(); goto pzJ9X; pzJ9X: foreach ($xOkS0 as $lxIPA => $knQyJ) { if ($cBDsM === $knQyJ) { return $lxIPA; } } goto kLCPA; Bg3O1: } public function nextInteger($Z1lY2 = null) { goto Ku1sC; ZghSW: return intval($cBDsM); goto fjPnD; Ku1sC: $cBDsM = $this->next($Z1lY2); goto lQroc; lQroc: if (null === $cBDsM) { return $cBDsM; } goto ZghSW; fjPnD: } public function nextDatetime($Z1lY2 = null) { goto yfOfi; xAdRF: return $cBDsM; goto QGTQR; yfOfi: $cBDsM = $this->next($Z1lY2); goto tg7rq; tg7rq: if (TimeUtil::isDatetimeEmpty($cBDsM)) { return $Z1lY2; } goto xAdRF; QGTQR: } }