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