<?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($gwXrh) { $this->setVariable('autoColor', $gwXrh); return $this; } public function signShow($gwXrh) { $this->setVariable('signShow', $gwXrh); return $this; } public function unserializeValue($gwXrh, AbstractField $VWt5t) { if ('' === $gwXrh || null === $gwXrh) { return null; } return $gwXrh; } public function serializeValue($gwXrh, $uV19D) { if ('' === $gwXrh || null === $gwXrh) { return null; } return $gwXrh; } public function prepareInput($gwXrh, $uV19D) { if ('' === $gwXrh || null === $gwXrh) { return null; } return $gwXrh; } }