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