<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid\Filter; use ModStart\Grid\Filter\Field\Datetime; class Range extends AbstractFilter { public function condition($xVdRy) { if (isset($xVdRy['range']) && ($xVdRy['range']['min'] || $xVdRy['range']['max'])) { goto NHZoU; whHei: return $this->buildCondition($this->column, array($tzAUI['min'], $tzAUI['max'])); goto C2i1g; HKg5a: if (!isset($tzAUI['max'])) { return $this->buildCondition($this->column, '>=', $tzAUI['min']); } goto vE9WW; NHZoU: $tzAUI = $xVdRy['range']; goto ovyyt; vE9WW: $this->query = 'whereBetween'; goto whHei; ovyyt: if (!isset($tzAUI['min'])) { return $this->buildCondition($this->column, '<=', $tzAUI['max']); } goto HKg5a; C2i1g: } return null; } public function datetime() { $this->field = new Field\Datetime($this); return $this; } public function date() { $this->field = new Field\Date($this); return $this; } }