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