<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Repository\Filter; use Illuminate\Database\Query\Builder; use Illuminate\Support\Collection; class RepositoryFilter { private $queries; public function __construct() { $this->queries = new Collection(); } public function clear() { $this->queries = new Collection(); return $this; } public function executeQueries(&$xaAIg) { $this->queries->each(function ($ib3B9) use(&$xaAIg) { $xaAIg = call_user_func_array(array($xaAIg, $ib3B9['method']), $ib3B9['arguments'] ? $ib3B9['arguments'] : array()); }); } public function __call($eNE35, $lUGZC) { $this->queries->push(array('method' => $eNE35, 'arguments' => $lUGZC)); return $this; } }