<?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($zrsQt = true) { $this->addVariables(array('autoTrim' => $zrsQt)); return $this; } public function prepareInput($mdHu1, $RpY_9) { if ($this->variables['autoTrim']) { $mdHu1 = StrUtil::filterSpecialChars($mdHu1); $mdHu1 = trim($mdHu1); } return $mdHu1; } }