1 | <?php |
||
7 | class Criteria |
||
8 | { |
||
9 | use Concerns\BuildsQueries, |
||
10 | Concerns\QueriesRelationships, |
||
11 | Concerns\EloquentBuildsQueries, |
||
12 | Concerns\SoftDeletingScope; |
||
13 | |||
14 | /** |
||
15 | * $methods. |
||
16 | * |
||
17 | * @var \Recca0120\Repository\Method[] |
||
18 | */ |
||
19 | protected $methods = []; |
||
20 | |||
21 | /** |
||
22 | * create. |
||
23 | * |
||
24 | * @return static |
||
25 | */ |
||
26 | 100 | public static function create() |
|
27 | { |
||
28 | 100 | return new static(); |
|
29 | } |
||
30 | |||
31 | /** |
||
32 | * alias raw. |
||
33 | * |
||
34 | * @param mixed $value |
||
35 | * @return Expression |
||
36 | */ |
||
37 | 2 | public static function expr($value) |
|
38 | { |
||
39 | 2 | return static::raw($value); |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param mixed $value |
||
44 | * @return \Recca0120\Repository\Expression |
||
45 | */ |
||
46 | 3 | public static function raw($value) |
|
50 | |||
51 | /** |
||
52 | * each. |
||
53 | * |
||
54 | * @param Closure $callback |
||
55 | * @return void |
||
56 | */ |
||
57 | 14 | public function each(Closure $callback) |
|
63 | |||
64 | /** |
||
65 | * toArray. |
||
66 | * |
||
67 | * @return array |
||
68 | */ |
||
69 | public function toArray() |
||
78 | } |
||
79 |