1 | <?php |
||
11 | class EnvironmentController extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * @var EnvironmentManager |
||
15 | */ |
||
16 | protected $EnvironmentManager; |
||
17 | protected $envPath; |
||
18 | |||
19 | /** |
||
20 | * @param EnvironmentManager $environmentManager |
||
21 | */ |
||
22 | public function __construct(EnvironmentManager $environmentManager) |
||
27 | |||
28 | /** |
||
29 | * Display the Environment page. |
||
30 | * |
||
31 | * @return \Illuminate\View\View |
||
32 | */ |
||
33 | public function index() |
||
40 | |||
41 | /** |
||
42 | * Processes the newly saved environment configuration and redirects back. |
||
43 | * |
||
44 | * @param Request $input |
||
45 | * |
||
46 | * @return \Illuminate\Http\RedirectResponse |
||
47 | */ |
||
48 | public function store(Request $input) |
||
58 | |||
59 | /** |
||
60 | * Key should be before the first = symbol and value should be after. |
||
61 | * Each new line (\r\n) should be a new array entry. |
||
62 | * |
||
63 | * @param $string |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | private function breakApartEnv($string) |
||
73 | |||
74 | private function flattenRequest(Request $input) |
||
86 | |||
87 | /** |
||
88 | * Save the edited content to the file. |
||
89 | * |
||
90 | * @param $string |
||
91 | * @return string |
||
92 | */ |
||
93 | public function saveFile($string) |
||
106 | |||
107 | } |
||
108 |