Files
boursecu_server/app/DB/Te/Scope.php
T

41 lines
684 B
PHP
Raw Normal View History

2026-01-24 14:03:11 +00:00
<?php
namespace App\DB\Te;
/**
* Created by PhpStorm.
* User: AraNote
* Date: 12/04/2018
* Time: 10:34 PM
*/
class Scope
{
public $items, $query;
/**
* Scope constructor.
* @param $items
*/
public function __construct($query, $items)
{
$this->query = $query;
$this->items = $items;
}
public static function init($query, $items)
{
return new Scope($query, $items);
}
public function run()
{
foreach ($this->items as $index => $item) {
Filter::init($this->query, $item, $index == 0)->run();
}
// dd($this->query->toSql());
return $this->query;
}
}