<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Grid\Filter\Field\Datetime; class Range extends AbstractFilter { public function condition($cGzJA) { if (isset($cGzJA['range']) && ($cGzJA['range']['min'] || $cGzJA['range']['max'])) { goto VHvyK; Oxb5z: if (!isset($gwXrh['max'])) { return $this->buildCondition($this->column, '>=', $gwXrh['min']); } goto dcAgl; QmxWD: if (!isset($gwXrh['min'])) { return $this->buildCondition($this->column, '<=', $gwXrh['max']); } goto Oxb5z; dcAgl: $this->query = 'whereBetween'; goto gmTQx; VHvyK: $gwXrh = $cGzJA['range']; goto QmxWD; gmTQx: return $this->buildCondition($this->column, array($gwXrh['min'], $gwXrh['max'])); goto dgdTc; dgdTc: } 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; } }