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