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