<?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($EdQjV) { $this->data = $EdQjV; } public static function build($EdQjV) { goto pqUiF; YtKV1: return $I4p57; goto uEMpV; pqUiF: $I4p57 = new ArrayPackage($EdQjV); goto lJKvs; lJKvs: $I4p57->cursor = 0; goto YtKV1; uEMpV: } public function resetCursor() { $this->cursor = 0; } public function next($eS4om = null) { goto c1jPL; MJH9P: return $eS4om; goto vnOK1; p61kF: if (isset($this->data[$vTPD6])) { return $this->data[$vTPD6]; } goto MJH9P; jdVeK: $this->cursor++; goto p61kF; c1jPL: $vTPD6 = $this->cursor; goto jdVeK; vnOK1: } public function nextTrimString($eS4om = null) { goto INUWe; VaDZK: $FT9zA = StrUtil::filterSpecialChars($FT9zA); goto margi; margi: return $FT9zA; goto VK_hQ; DYxUa: $FT9zA = @trim((string) $FT9zA); goto VaDZK; EEHyz: if (null === $FT9zA) { return $eS4om; } goto DYxUa; INUWe: $FT9zA = $this->next($eS4om); goto EEHyz; VK_hQ: } public function nextTrimStringMapInteger($G26_X = array(), $eS4om = null) { goto aoz3C; aoz3C: $FT9zA = $this->nextTrimString(); goto Q4Wm8; Q4Wm8: if (isset($G26_X[$FT9zA])) { return $G26_X[$FT9zA]; } goto QVPy2; QVPy2: return $eS4om; goto T5vBr; T5vBr: } public function nextType($anhu0, $eS4om = null) { goto W_U6_; wvPJA: $ddUyu = $anhu0::getList(); goto KMHZj; KMHZj: foreach ($ddUyu as $kh68j => $tHq0l) { if ($FT9zA == $kh68j) { return $kh68j; } } goto nwjrF; nwjrF: return $eS4om; goto KYKrO; W_U6_: $FT9zA = $this->nextTrimString(); goto wvPJA; KYKrO: } public function nextTypeValue($anhu0, $eS4om = null) { goto Z9KWX; o1n2n: return $eS4om; goto es7tM; VET6K: foreach ($ddUyu as $kh68j => $tHq0l) { if ($FT9zA === $tHq0l) { return $kh68j; } } goto o1n2n; G9APA: $ddUyu = $anhu0::getList(); goto VET6K; Z9KWX: $FT9zA = $this->nextTrimString(); goto G9APA; es7tM: } public function nextInteger($eS4om = null) { goto CZBQZ; CZBQZ: $FT9zA = $this->next($eS4om); goto nBlB9; NS5ON: return intval($FT9zA); goto VE5_0; nBlB9: if (null === $FT9zA) { return $FT9zA; } goto NS5ON; VE5_0: } public function nextDatetime($eS4om = null) { goto K314S; BnSWi: if (TimeUtil::isDatetimeEmpty($FT9zA)) { return $eS4om; } goto FicbX; FicbX: return $FT9zA; goto HRQfJ; K314S: $FT9zA = $this->next($eS4om); goto BnSWi; HRQfJ: } }