<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Grid; use Illuminate\Contracts\Support\Renderable; use Illuminate\Database\Query\Builder; use Illuminate\Support\Collection; class GridFilterScope implements Renderable { protected $filter; public $key = ''; protected $label = ''; protected $queries; public function __construct(GridFilter $XYn5i, $VFU9l = 'fixed', $Nvfoc = '') { goto JrEfq; oZaLb: $this->label = $Nvfoc ? $Nvfoc : $VFU9l; goto gdWQH; JrEfq: $this->filter = $XYn5i; goto GSCmH; gdWQH: $this->queries = new Collection(); goto Y2NWr; GSCmH: $this->key = $VFU9l; goto oZaLb; Y2NWr: } public function condition() { return $this->queries->map(function ($vw3jY) { return array($vw3jY['method'] => $vw3jY['arguments']); })->toArray(); } public function render() { return ''; } public function __call($fVu6a, $RSGSj) { $this->queries->push(array('method' => $fVu6a, 'arguments' => $RSGSj)); return $this; } }