Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 21 |
App\Controllers\FormularControlController | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 21 |
__construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
formularAction | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 18 |
<?php | |
namespace App\Controllers; | |
class FormularControlController extends \Core\Controller { | |
private $form; | |
public function __construct($route_params) { | |
parent::__construct($route_params); | |
$this->form = \App\Models\Formular::getInstance(); | |
} | |
public function formularAction() { | |
$post = $this->request->getPost(); | |
$_SESSION['formularData'] = [ 'E-Mail' => $post['E-Mail'], | |
'Vorname' => $post['Vorname'], | |
'Nachname' => $post['Nachname'], | |
'Straße' => $post['Straße'], | |
'Hausnummer' => $post['Hausnummer'], | |
'Land' => $post['Land'], | |
'Stadt' => $post['Stadt'], | |
'Postleitzahl' => $post['Postleitzahl'] | |
]; | |
if ($post['Vorname'] == "Maciej") { | |
header('Location: /maciej'); | |
} else { | |
$formular = new \App\Models\Formular(); | |
$formular->formularInput($_SESSION['formularData']); | |
header('Location: /payment'); | |
} | |
} | |
} |