1 | <?php |
||
7 | class Config |
||
8 | { |
||
9 | /** |
||
10 | * @var ConfigRepository |
||
11 | */ |
||
12 | protected $repository; |
||
13 | |||
14 | /** |
||
15 | * Config constructor. |
||
16 | * |
||
17 | * @param ConfigRepository $repository |
||
18 | */ |
||
19 | public function __construct(ConfigRepository $repository) |
||
23 | |||
24 | /** |
||
25 | * Whether all queries should be logged. |
||
26 | * |
||
27 | * @return bool |
||
28 | */ |
||
29 | public function logQueries() |
||
33 | |||
34 | /** |
||
35 | * Whether slow queries should be logged. |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | public function logSlowQueries() |
||
43 | |||
44 | /** |
||
45 | * Minimum execution time (in milliseconds) to consider query as slow. |
||
46 | * |
||
47 | * @return float |
||
48 | */ |
||
49 | public function slowLogTime() |
||
53 | |||
54 | /** |
||
55 | * Whether SQL log should be overridden for each request. |
||
56 | * |
||
57 | * @return bool |
||
58 | */ |
||
59 | public function overrideFile() |
||
63 | |||
64 | /** |
||
65 | * Get directory where log files should be saved. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | public function logDirectory() |
||
73 | |||
74 | /** |
||
75 | * Whether query execution time should be converted to seconds. |
||
76 | * |
||
77 | * @return bool |
||
78 | */ |
||
79 | public function useSeconds() |
||
83 | |||
84 | /** |
||
85 | * Whether console queries should be logged into separate files. |
||
86 | * |
||
87 | * @return bool |
||
88 | */ |
||
89 | public function separateConsoleLogs() |
||
93 | } |
||
94 |