<?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(&$lpymm) { $this->queries->each(function ($gwXrh) use(&$lpymm) { $lpymm = call_user_func_array(array($lpymm, $gwXrh['method']), $gwXrh['arguments'] ? $gwXrh['arguments'] : array()); }); } public function __call($HxDDI, $CUZy6) { $this->queries->push(array('method' => $HxDDI, 'arguments' => $CUZy6)); return $this; } }