<?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($zonFp) { $this->data = $zonFp; } public static function build($zonFp) { goto JM3G1; TvJLR: $QG_u_->cursor = 0; goto TdvfP; TdvfP: return $QG_u_; goto o0joc; JM3G1: $QG_u_ = new ArrayPackage($zonFp); goto TvJLR; o0joc: } public function resetCursor() { $this->cursor = 0; } public function next($snkf0 = null) { goto PkzNR; Ys_iY: $this->cursor++; goto Q_gmV; egmHM: return $snkf0; goto fUDfm; PkzNR: $xlsSz = $this->cursor; goto Ys_iY; Q_gmV: if (isset($this->data[$xlsSz])) { return $this->data[$xlsSz]; } goto egmHM; fUDfm: } public function nextTrimString($snkf0 = null) { goto y_J6z; r9WUF: if (null === $HDpl6) { return $snkf0; } goto aPUIo; Rv_CB: return $HDpl6; goto J85wZ; y_J6z: $HDpl6 = $this->next($snkf0); goto r9WUF; aPUIo: $HDpl6 = @trim((string) $HDpl6); goto ozhFB; ozhFB: $HDpl6 = StrUtil::filterSpecialChars($HDpl6); goto Rv_CB; J85wZ: } public function nextTrimStringMapInteger($iswcB = array(), $snkf0 = null) { goto xZZC7; xZZC7: $HDpl6 = $this->nextTrimString(); goto Q7WK4; XeJMi: return $snkf0; goto mV_be; Q7WK4: if (isset($iswcB[$HDpl6])) { return $iswcB[$HDpl6]; } goto XeJMi; mV_be: } public function nextType($nYSke, $snkf0 = null) { goto R5lR0; R5lR0: $HDpl6 = $this->nextTrimString(); goto XZRfZ; XZRfZ: $CEqzM = $nYSke::getList(); goto AsQ0w; AsQ0w: foreach ($CEqzM as $pztz4 => $Q0rz2) { if ($HDpl6 == $pztz4) { return $pztz4; } } goto QIgjh; QIgjh: return $snkf0; goto Eu6xp; Eu6xp: } public function nextTypeValue($nYSke, $snkf0 = null) { goto US4qv; u89fE: $CEqzM = $nYSke::getList(); goto oD0kC; US4qv: $HDpl6 = $this->nextTrimString(); goto u89fE; oD0kC: foreach ($CEqzM as $pztz4 => $Q0rz2) { if ($HDpl6 === $Q0rz2) { return $pztz4; } } goto tO3os; tO3os: return $snkf0; goto LTalV; LTalV: } public function nextInteger($snkf0 = null) { goto pxwyQ; pxwyQ: $HDpl6 = $this->next($snkf0); goto lOCiI; MmfnY: return intval($HDpl6); goto e5C0z; lOCiI: if (null === $HDpl6) { return $HDpl6; } goto MmfnY; e5C0z: } public function nextDatetime($snkf0 = null) { goto pSqgp; l8Kbj: return $HDpl6; goto Gs6k6; NJQF2: if (TimeUtil::isDatetimeEmpty($HDpl6)) { return $snkf0; } goto l8Kbj; pSqgp: $HDpl6 = $this->next($snkf0); goto NJQF2; Gs6k6: } }