1 | <?php |
||
15 | class HydrationOptions |
||
16 | { |
||
17 | /** |
||
18 | * @var array |
||
19 | */ |
||
20 | protected $params = []; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $default_params = [ |
||
26 | 'disable_formatters' => false, |
||
27 | 'disable_renderers' => false, |
||
28 | 'disable_column_exclusion' => false |
||
29 | ]; |
||
30 | |||
31 | 41 | public function __construct() |
|
35 | |||
36 | /** |
||
37 | * Disable formatters processing when getting data. |
||
38 | * |
||
39 | * @return HydrationOptions |
||
40 | */ |
||
41 | 17 | public function disableFormatters() |
|
47 | |||
48 | /** |
||
49 | * Enable formatters processing when getting data. |
||
50 | * |
||
51 | * @return HydrationOptions |
||
52 | */ |
||
53 | 1 | public function enableFormatters() |
|
59 | |||
60 | /** |
||
61 | * Test chether formatters should be called when getting data. |
||
62 | * |
||
63 | * @return bool |
||
64 | */ |
||
65 | 10 | public function isFormattersEnabled() |
|
69 | |||
70 | /** |
||
71 | * Disable renderers processing when getting data. |
||
72 | * |
||
73 | * @return HydrationOptions |
||
74 | */ |
||
75 | 1 | public function disableRenderers() |
|
81 | |||
82 | /** |
||
83 | * Enable renderers processing when getting data. |
||
84 | * |
||
85 | * @return HydrationOptions |
||
86 | */ |
||
87 | 1 | public function enableRenderers() |
|
93 | |||
94 | /** |
||
95 | * Test whether renderers should be called when getting data. |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | 10 | public function isRenderersEnabled() |
|
103 | |||
104 | /** |
||
105 | * Disable column exclusion when getting data. |
||
106 | * |
||
107 | * @return HydrationOptions |
||
108 | */ |
||
109 | 1 | public function disableColumnExclusion() |
|
115 | |||
116 | /** |
||
117 | * Enable column exclusion when getting data. |
||
118 | * |
||
119 | * @return HydrationOptions |
||
120 | */ |
||
121 | 1 | public function enableColumnExclusion() |
|
127 | |||
128 | /** |
||
129 | * Test whether column model exclusions are enabled. |
||
130 | * |
||
131 | * @return bool |
||
132 | */ |
||
133 | 10 | public function isColumnExclusionEnabled() |
|
137 | } |
||
138 |