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