<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; use ModStart\Core\Util\StrUtil; class Text extends AbstractField { protected function setup() { $this->addVariables(array('autoTrim' => false)); } public function autoTrim($anbYF = true) { $this->addVariables(array('autoTrim' => $anbYF)); return $this; } public function prepareInput($wvO30, $T92oK) { if ($this->variables['autoTrim']) { $wvO30 = StrUtil::filterSpecialChars($wvO30); $wvO30 = trim($wvO30); } return $wvO30; } }