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