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