1 | <?php |
||
12 | class FullScopes extends BaseScope implements ScopeInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $scopes = [ |
||
18 | InNotInScope::class, |
||
19 | FilterScope::class, |
||
20 | IncludeScope::class, |
||
21 | OffsetLimitScope::class, |
||
22 | SearchScope::class, |
||
23 | OrderScope::class, |
||
24 | ]; |
||
25 | |||
26 | /** |
||
27 | * reset and set scopes to be executed. |
||
28 | * |
||
29 | * @param $scopes string|array |
||
30 | * |
||
31 | * @return $this |
||
32 | */ |
||
33 | public function setScopes($scopes) |
||
41 | |||
42 | /** |
||
43 | * add scopes to existing ones. |
||
44 | * |
||
45 | * @param $scopes string|array |
||
46 | * |
||
47 | * @return $this |
||
48 | */ |
||
49 | public function addScopes($scopes) |
||
56 | |||
57 | /** |
||
58 | * assemble scopes. |
||
59 | * |
||
60 | * @param $scopes |
||
61 | */ |
||
62 | protected function assemble(array $scopes) |
||
79 | |||
80 | /** |
||
81 | * Process scopes. |
||
82 | * |
||
83 | * @param Builder $builder |
||
84 | * @param Model $model |
||
85 | * |
||
86 | * @return Builder |
||
87 | */ |
||
88 | public function apply(Builder $builder, Model $model) |
||
98 | } |
||
99 |