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