<?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($IaeCl) { $this->data = $IaeCl; } public static function build($IaeCl) { goto dRCQ2; b3hTL: $EYSgh->cursor = 0; goto Hj_mN; Hj_mN: return $EYSgh; goto m3H6a; dRCQ2: $EYSgh = new ArrayPackage($IaeCl); goto b3hTL; m3H6a: } public function resetCursor() { $this->cursor = 0; } public function next($qqJ9g = null) { goto Sas20; Sas20: $aDVv6 = $this->cursor; goto pWO8v; OYq2Z: return $qqJ9g; goto Nfvs5; gIoCh: if (isset($this->data[$aDVv6])) { return $this->data[$aDVv6]; } goto OYq2Z; pWO8v: $this->cursor++; goto gIoCh; Nfvs5: } public function nextTrimString($qqJ9g = null) { goto Y_1f4; Q_9lv: $ib3B9 = StrUtil::filterSpecialChars($ib3B9); goto I_y6V; I_y6V: return $ib3B9; goto CS1QN; aVI_m: if (null === $ib3B9) { return $qqJ9g; } goto cfyYA; cfyYA: $ib3B9 = @trim((string) $ib3B9); goto Q_9lv; Y_1f4: $ib3B9 = $this->next($qqJ9g); goto aVI_m; CS1QN: } public function nextTrimStringMapInteger($ZJEaj = array(), $qqJ9g = null) { goto fSY0W; Tg2lh: return $qqJ9g; goto dF2oz; EzD6S: if (isset($ZJEaj[$ib3B9])) { return $ZJEaj[$ib3B9]; } goto Tg2lh; fSY0W: $ib3B9 = $this->nextTrimString(); goto EzD6S; dF2oz: } public function nextType($f6h3S, $qqJ9g = null) { goto o79rf; vzZ_U: return $qqJ9g; goto VWYzp; edCCH: foreach ($ctQO9 as $F_a6B => $JiRHR) { if ($ib3B9 == $F_a6B) { return $F_a6B; } } goto vzZ_U; E2GrN: $ctQO9 = $f6h3S::getList(); goto edCCH; o79rf: $ib3B9 = $this->nextTrimString(); goto E2GrN; VWYzp: } public function nextTypeValue($f6h3S, $qqJ9g = null) { goto CjobS; MhxsV: $ctQO9 = $f6h3S::getList(); goto YSy3Z; M9vR8: return $qqJ9g; goto S6r1y; CjobS: $ib3B9 = $this->nextTrimString(); goto MhxsV; YSy3Z: foreach ($ctQO9 as $F_a6B => $JiRHR) { if ($ib3B9 === $JiRHR) { return $F_a6B; } } goto M9vR8; S6r1y: } public function nextInteger($qqJ9g = null) { goto hRSty; wfkRB: if (null === $ib3B9) { return $ib3B9; } goto YdW_f; hRSty: $ib3B9 = $this->next($qqJ9g); goto wfkRB; YdW_f: return intval($ib3B9); goto K1Ntf; K1Ntf: } public function nextDatetime($qqJ9g = null) { goto kqb70; tl1bc: return $ib3B9; goto mKL9x; kqb70: $ib3B9 = $this->next($qqJ9g); goto VM9YR; VM9YR: if (TimeUtil::isDatetimeEmpty($ib3B9)) { return $qqJ9g; } goto tl1bc; mKL9x: } }