<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Grid\Filter\Field\Datetime; class Range extends AbstractFilter { public function condition($GWC6A) { if (isset($GWC6A['range']) && ($GWC6A['range']['min'] || $GWC6A['range']['max'])) { goto gRXCK; YvdI4: if (!isset($wvO30['max'])) { return $this->buildCondition($this->column, '>=', $wvO30['min']); } goto DHFcq; s3ZmW: return $this->buildCondition($this->column, array($wvO30['min'], $wvO30['max'])); goto wGs5g; srJRK: if (!isset($wvO30['min'])) { return $this->buildCondition($this->column, '<=', $wvO30['max']); } goto YvdI4; gRXCK: $wvO30 = $GWC6A['range']; goto srJRK; DHFcq: $this->query = 'whereBetween'; goto s3ZmW; wGs5g: } return null; } public function datetime() { $this->field = new Field\Datetime($this); return $this; } public function date() { $this->field = new Field\Date($this); return $this; } public function text() { $this->field = new Field\Text($this); return $this; } public function number() { $this->field = new Field\Number($this); return $this; } }