<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Field; class Decimal extends AbstractField { protected $view = 'modstart::core.field.number'; protected $rules = array('regex:/^-?\\d+(\\.\\d+)?$/i'); protected function setup() { $this->addVariables(array('autoColor' => false, 'signShow' => false)); } public function autoColor($Gttsd) { $this->setVariable('autoColor', $Gttsd); return $this; } public function signShow($Gttsd) { $this->setVariable('signShow', $Gttsd); return $this; } public function unserializeValue($Gttsd, AbstractField $acdQI) { if ('' === $Gttsd || null === $Gttsd) { return null; } return $Gttsd; } public function serializeValue($Gttsd, $BWo2e) { if ('' === $Gttsd || null === $Gttsd) { return null; } return $Gttsd; } public function prepareInput($Gttsd, $BWo2e) { if ('' === $Gttsd || null === $Gttsd) { return null; } return $Gttsd; } }