1 | <?php |
||
7 | class DataTables |
||
8 | { |
||
9 | use Macroable; |
||
10 | |||
11 | /** |
||
12 | * DataTables request object. |
||
13 | * |
||
14 | * @var \Yajra\DataTables\Utilities\Request |
||
15 | */ |
||
16 | protected $request; |
||
17 | |||
18 | /** |
||
19 | * HTML builder instance. |
||
20 | * |
||
21 | * @var \Yajra\DataTables\Html\Builder |
||
22 | */ |
||
23 | protected $html; |
||
24 | |||
25 | /** |
||
26 | * Make a DataTable instance from source. |
||
27 | * Alias of make for backward compatibility. |
||
28 | * |
||
29 | * @param mixed $source |
||
30 | * @return mixed |
||
31 | * @throws \Exception |
||
32 | */ |
||
33 | public static function of($source) |
||
37 | |||
38 | /** |
||
39 | * Make a DataTable instance from source. |
||
40 | * |
||
41 | * @param mixed $source |
||
42 | * @return mixed |
||
43 | * @throws \Exception |
||
44 | */ |
||
45 | public static function make($source) |
||
65 | |||
66 | /** |
||
67 | * Get request object. |
||
68 | * |
||
69 | * @return \Yajra\DataTables\Utilities\Request |
||
70 | */ |
||
71 | public function getRequest() |
||
75 | |||
76 | /** |
||
77 | * Get config instance. |
||
78 | * |
||
79 | * @return \Yajra\DataTables\Utilities\Config |
||
80 | */ |
||
81 | public function getConfig() |
||
85 | |||
86 | /** |
||
87 | * @deprecated Please use query() instead, this method will be removed in a next version. |
||
88 | * @param $builder |
||
89 | * @return QueryDataTable |
||
90 | */ |
||
91 | public function queryBuilder($builder) |
||
95 | |||
96 | /** |
||
97 | * DataTables using Query. |
||
98 | * |
||
99 | * @param \Illuminate\Database\Query\Builder|mixed $builder |
||
100 | * @return DataTableAbstract|QueryDataTable |
||
101 | */ |
||
102 | public function query($builder) |
||
106 | |||
107 | /** |
||
108 | * DataTables using Eloquent Builder. |
||
109 | * |
||
110 | * @param \Illuminate\Database\Eloquent\Builder|mixed $builder |
||
111 | * @return DataTableAbstract|EloquentDataTable |
||
112 | */ |
||
113 | public function eloquent($builder) |
||
117 | |||
118 | /** |
||
119 | * DataTables using Collection. |
||
120 | * |
||
121 | * @param \Illuminate\Support\Collection|array $collection |
||
122 | * @return DataTableAbstract|CollectionDataTable |
||
123 | */ |
||
124 | public function collection($collection) |
||
128 | |||
129 | /** |
||
130 | * Get html builder instance. |
||
131 | * |
||
132 | * @return \Yajra\DataTables\Html\Builder |
||
133 | * @throws \Exception |
||
134 | */ |
||
135 | public function getHtmlBuilder() |
||
143 | } |
||
144 |