<?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($zvN10) { $this->data = $zvN10; } public static function build($zvN10) { goto whKeJ; whKeJ: $kxIt1 = new ArrayPackage($zvN10); goto y5Xko; qCMQR: return $kxIt1; goto KIAIh; y5Xko: $kxIt1->cursor = 0; goto qCMQR; KIAIh: } public function resetCursor() { $this->cursor = 0; } public function next($dMLhR = null) { goto o7Fwx; kIJFS: $this->cursor++; goto j1P4u; j1P4u: if (isset($this->data[$EqYVi])) { return $this->data[$EqYVi]; } goto P4flB; o7Fwx: $EqYVi = $this->cursor; goto kIJFS; P4flB: return $dMLhR; goto zjDHa; zjDHa: } public function nextTrimString($dMLhR = null) { goto XfRJA; kJCri: if (null === $Mczr_) { return $dMLhR; } goto GLzt8; GLzt8: $Mczr_ = @trim((string) $Mczr_); goto hyXNw; hyXNw: $Mczr_ = StrUtil::filterSpecialChars($Mczr_); goto niJXq; XfRJA: $Mczr_ = $this->next($dMLhR); goto kJCri; niJXq: return $Mczr_; goto n7wVk; n7wVk: } public function nextTrimStringMapInteger($YhMWv = array(), $dMLhR = null) { goto X7olb; sEJZ6: if (isset($YhMWv[$Mczr_])) { return $YhMWv[$Mczr_]; } goto kYkTt; X7olb: $Mczr_ = $this->nextTrimString(); goto sEJZ6; kYkTt: return $dMLhR; goto YvMCt; YvMCt: } public function nextType($Cs86S, $dMLhR = null) { goto TU_xR; IAyec: return $dMLhR; goto KBXdA; h5H2N: $AG1dZ = $Cs86S::getList(); goto Jra0n; TU_xR: $Mczr_ = $this->nextTrimString(); goto h5H2N; Jra0n: foreach ($AG1dZ as $B34tD => $Xz28r) { if ($Mczr_ == $B34tD) { return $B34tD; } } goto IAyec; KBXdA: } public function nextTypeValue($Cs86S, $dMLhR = null) { goto PeLqf; yJakV: return $dMLhR; goto FQpOo; PeLqf: $Mczr_ = $this->nextTrimString(); goto FjHpe; FjHpe: $AG1dZ = $Cs86S::getList(); goto ITiz6; ITiz6: foreach ($AG1dZ as $B34tD => $Xz28r) { if ($Mczr_ === $Xz28r) { return $B34tD; } } goto yJakV; FQpOo: } public function nextInteger($dMLhR = null) { goto eoXQS; EF_8s: if (null === $Mczr_) { return $Mczr_; } goto UiuQt; eoXQS: $Mczr_ = $this->next($dMLhR); goto EF_8s; UiuQt: return intval($Mczr_); goto yidfR; yidfR: } public function nextDatetime($dMLhR = null) { goto TYY2T; Zv4Op: return $Mczr_; goto x8zzo; TYY2T: $Mczr_ = $this->next($dMLhR); goto xJ2vT; xJ2vT: if (TimeUtil::isDatetimeEmpty($Mczr_)) { return $dMLhR; } goto Zv4Op; x8zzo: } }