<?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($CnWtd) { $this->data = $CnWtd; } public static function build($CnWtd) { goto nNRAV; PHbrQ: $q2pxK->cursor = 0; goto Bwhv4; Bwhv4: return $q2pxK; goto w7Wy6; nNRAV: $q2pxK = new ArrayPackage($CnWtd); goto PHbrQ; w7Wy6: } public function resetCursor() { $this->cursor = 0; } public function next($pdVyN = null) { goto DTGaU; i3z_d: if (isset($this->data[$K_IJ6])) { return $this->data[$K_IJ6]; } goto q6V_0; pXAMx: $this->cursor++; goto i3z_d; q6V_0: return $pdVyN; goto LRPQE; DTGaU: $K_IJ6 = $this->cursor; goto pXAMx; LRPQE: } public function nextTrimString($pdVyN = null) { goto sg6tq; sg6tq: $Gttsd = $this->next($pdVyN); goto uPROX; ae8rp: $Gttsd = StrUtil::filterSpecialChars($Gttsd); goto j_Gcv; uPROX: if (null === $Gttsd) { return $pdVyN; } goto Ivjgm; j_Gcv: return $Gttsd; goto a80fX; Ivjgm: $Gttsd = @trim((string) $Gttsd); goto ae8rp; a80fX: } public function nextTrimStringMapInteger($QOzB2 = array(), $pdVyN = null) { goto mHlTp; o4hy7: return $pdVyN; goto Dh1Ru; mHlTp: $Gttsd = $this->nextTrimString(); goto x7fG6; x7fG6: if (isset($QOzB2[$Gttsd])) { return $QOzB2[$Gttsd]; } goto o4hy7; Dh1Ru: } public function nextType($HAFOV, $pdVyN = null) { goto jAjkv; LrutR: $Nq2Ir = $HAFOV::getList(); goto KFHTs; Fchiv: return $pdVyN; goto AKbZF; jAjkv: $Gttsd = $this->nextTrimString(); goto LrutR; KFHTs: foreach ($Nq2Ir as $RTHJ6 => $F6Fus) { if ($Gttsd == $RTHJ6) { return $RTHJ6; } } goto Fchiv; AKbZF: } public function nextTypeValue($HAFOV, $pdVyN = null) { goto vai3x; imVZ2: return $pdVyN; goto H97jh; IrW4n: foreach ($Nq2Ir as $RTHJ6 => $F6Fus) { if ($Gttsd === $F6Fus) { return $RTHJ6; } } goto imVZ2; iEFZV: $Nq2Ir = $HAFOV::getList(); goto IrW4n; vai3x: $Gttsd = $this->nextTrimString(); goto iEFZV; H97jh: } public function nextInteger($pdVyN = null) { goto XbEYb; Dc8q6: if (null === $Gttsd) { return $Gttsd; } goto Cc7dC; Cc7dC: return intval($Gttsd); goto VsQi_; XbEYb: $Gttsd = $this->next($pdVyN); goto Dc8q6; VsQi_: } public function nextDatetime($pdVyN = null) { goto O9FTl; O9FTl: $Gttsd = $this->next($pdVyN); goto yJoGP; yJoGP: if (TimeUtil::isDatetimeEmpty($Gttsd)) { return $pdVyN; } goto UVcOV; UVcOV: return $Gttsd; goto vbwWS; vbwWS: } }