<?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($SjN8A) { $this->data = $SjN8A; } public static function build($SjN8A) { goto QMddu; QMddu: $Ah780 = new ArrayPackage($SjN8A); goto ctdNN; ctdNN: $Ah780->cursor = 0; goto EB6Q8; EB6Q8: return $Ah780; goto XXnzs; XXnzs: } public function resetCursor() { $this->cursor = 0; } public function next($UZN94 = null) { goto Ye1tu; aVtbd: if (isset($this->data[$ouMWs])) { return $this->data[$ouMWs]; } goto yVldP; yVldP: return $UZN94; goto w_Rl3; BvYUF: $this->cursor++; goto aVtbd; Ye1tu: $ouMWs = $this->cursor; goto BvYUF; w_Rl3: } public function nextTrimString($UZN94 = null) { goto SYaFz; SYaFz: $wvO30 = $this->next($UZN94); goto JNdGF; GjyP9: return $wvO30; goto vFTmQ; JNdGF: if (null === $wvO30) { return $UZN94; } goto bdUr1; bdUr1: $wvO30 = @trim((string) $wvO30); goto sRkE2; sRkE2: $wvO30 = StrUtil::filterSpecialChars($wvO30); goto GjyP9; vFTmQ: } public function nextTrimStringMapInteger($Ur1Ce = array(), $UZN94 = null) { goto P0FDW; HG26A: return $UZN94; goto T8eME; QivHa: if (isset($Ur1Ce[$wvO30])) { return $Ur1Ce[$wvO30]; } goto HG26A; P0FDW: $wvO30 = $this->nextTrimString(); goto QivHa; T8eME: } public function nextType($msr_l, $UZN94 = null) { goto ahoOj; P5PIZ: $ttiXA = $msr_l::getList(); goto qMdew; ahoOj: $wvO30 = $this->nextTrimString(); goto P5PIZ; qMdew: foreach ($ttiXA as $plrwN => $uTz0e) { if ($wvO30 == $plrwN) { return $plrwN; } } goto JjJOs; JjJOs: return $UZN94; goto ohlXq; ohlXq: } public function nextTypeValue($msr_l, $UZN94 = null) { goto vd1eU; vd1eU: $wvO30 = $this->nextTrimString(); goto fZfEq; fZfEq: $ttiXA = $msr_l::getList(); goto GB7R4; mx64m: return $UZN94; goto WiWJs; GB7R4: foreach ($ttiXA as $plrwN => $uTz0e) { if ($wvO30 === $uTz0e) { return $plrwN; } } goto mx64m; WiWJs: } public function nextInteger($UZN94 = null) { goto xWZEt; xWZEt: $wvO30 = $this->next($UZN94); goto DkZRB; DkZRB: if (null === $wvO30) { return $wvO30; } goto RG9_d; RG9_d: return intval($wvO30); goto HthJ3; HthJ3: } public function nextDatetime($UZN94 = null) { goto kx3k0; p5Ny_: return $wvO30; goto ZuZy_; i0c5V: if (TimeUtil::isDatetimeEmpty($wvO30)) { return $UZN94; } goto p5Ny_; kx3k0: $wvO30 = $this->next($UZN94); goto i0c5V; ZuZy_: } }