1 | <?php |
||
10 | class DataTables |
||
11 | { |
||
12 | /** |
||
13 | * DataTables request object. |
||
14 | * |
||
15 | * @var \Yajra\DataTables\Utilities\Request |
||
16 | */ |
||
17 | protected $request; |
||
18 | |||
19 | /** |
||
20 | * HTML builder instance. |
||
21 | * |
||
22 | * @var \Yajra\DataTables\Html\Builder |
||
23 | */ |
||
24 | protected $html; |
||
25 | |||
26 | /** |
||
27 | * Make a DataTable instance from source. |
||
28 | * Alias of make for backward compatibility. |
||
29 | * |
||
30 | * @param mixed $source |
||
31 | * @return mixed |
||
32 | * @throws \Exception |
||
33 | */ |
||
34 | public function of($source) |
||
38 | |||
39 | /** |
||
40 | * Make a DataTable instance from source. |
||
41 | * |
||
42 | * @param mixed $source |
||
43 | * @return mixed |
||
44 | * @throws \Exception |
||
45 | */ |
||
46 | public function make($source) |
||
58 | |||
59 | /** |
||
60 | * Get the optimum engine for the given data source. |
||
61 | * |
||
62 | * @param mixed $source |
||
63 | * @return string|null |
||
64 | */ |
||
65 | protected function getEngineForSource($source) |
||
80 | |||
81 | /** |
||
82 | * Create a new DataTable instance. |
||
83 | * |
||
84 | * @param string $engine |
||
85 | * @param mixed $source |
||
86 | * @return mixed |
||
87 | * @throws \Exception |
||
88 | */ |
||
89 | protected function createDataTable($engine, $source) |
||
97 | |||
98 | /** |
||
99 | * Get request object. |
||
100 | * |
||
101 | * @return \Yajra\DataTables\Utilities\Request |
||
102 | */ |
||
103 | public function getRequest() |
||
107 | |||
108 | /** |
||
109 | * Get config instance. |
||
110 | * |
||
111 | * @return \Yajra\DataTables\Utilities\Config |
||
112 | */ |
||
113 | public function getConfig() |
||
117 | |||
118 | /** |
||
119 | * @deprecated Please use query() instead, this method will be removed in a next version. |
||
120 | * @param $builder |
||
121 | * @return QueryDataTable |
||
122 | */ |
||
123 | public function queryBuilder($builder) |
||
127 | |||
128 | /** |
||
129 | * Get html builder instance. |
||
130 | * |
||
131 | * @return \Yajra\DataTables\Html\Builder |
||
132 | * @throws \Exception |
||
133 | */ |
||
134 | public function getHtmlBuilder() |
||
142 | |||
143 | /** |
||
144 | * Make a DataTable instance by using method name as engine. |
||
145 | * |
||
146 | * @param string $method |
||
147 | * @param array $parameters |
||
148 | * @return mixed |
||
149 | */ |
||
150 | public function __call($method, $parameters) |
||
154 | } |
||
155 |