1 | <?php |
||
15 | class Config |
||
16 | { |
||
17 | /** |
||
18 | * The default database file path. |
||
19 | * |
||
20 | * @const string |
||
21 | */ |
||
22 | const DEFAULT_DATABASE_FILE_PATH = 'commander.sqlite'; |
||
23 | |||
24 | /** |
||
25 | * The default timeout for process execution. |
||
26 | * |
||
27 | * @const string |
||
28 | */ |
||
29 | const DEFAULT_PROCESS_TIMEOUT = 60; |
||
30 | |||
31 | /** |
||
32 | * The database file path. |
||
33 | * |
||
34 | * @var string|null |
||
35 | */ |
||
36 | private $databaseFilePath; |
||
37 | |||
38 | /** |
||
39 | * The cache directory. |
||
40 | * |
||
41 | * @var string|null |
||
42 | */ |
||
43 | private $cacheDirectory; |
||
44 | |||
45 | /** |
||
46 | * The log file path. |
||
47 | * |
||
48 | * @var string|null |
||
49 | */ |
||
50 | private $logFilePath; |
||
51 | |||
52 | /** |
||
53 | * The process timeout. |
||
54 | * |
||
55 | * @var int|null |
||
56 | */ |
||
57 | private $processTimeout; |
||
58 | |||
59 | /** |
||
60 | * Get database file path. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function getDatabaseFilePath() |
||
72 | |||
73 | /** |
||
74 | * Set database file path. |
||
75 | * |
||
76 | * @param string $databaseFilePath |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function setDatabaseFilePath($databaseFilePath) |
||
85 | |||
86 | /** |
||
87 | * Get cache directory. |
||
88 | * |
||
89 | * @return string|null |
||
90 | */ |
||
91 | public function getCacheDirectory() |
||
92 | { |
||
93 | return $this->cacheDirectory; |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * Set cache directory. |
||
98 | * |
||
99 | * @param string $cacheDirectory |
||
100 | * |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function setCacheDirectory($cacheDirectory) |
||
104 | { |
||
105 | $this->cacheDirectory = $cacheDirectory; |
||
106 | return $this; |
||
107 | } |
||
108 | |||
109 | /** |
||
110 | * Get log file path. |
||
111 | * |
||
112 | * @return string|null |
||
113 | */ |
||
114 | public function getLogFilePath() |
||
118 | |||
119 | /** |
||
120 | * Set log file path. |
||
121 | * |
||
122 | * @param string $logFilePath |
||
123 | * |
||
124 | * @return $this |
||
125 | */ |
||
126 | public function setLogFilePath($logFilePath) |
||
131 | |||
132 | /** |
||
133 | * Get process timeout. |
||
134 | * |
||
135 | * @return int |
||
136 | */ |
||
137 | public function getProcessTimeout() |
||
145 | |||
146 | /** |
||
147 | * Set process timeout. |
||
148 | * |
||
149 | * @param int $processTimeout |
||
150 | * |
||
151 | * @return $this |
||
152 | */ |
||
153 | public function setProcessTimeout($processTimeout) |
||
158 | } |
||
159 |