You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.1 KiB
PHP
49 lines
1.1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Informatica Eindproject D4p
|
|
* 6in3, Stedelijk Gymnasium Nijmegen
|
|
* Docent: Hans de Wolf
|
|
*
|
|
* ==================
|
|
*
|
|
* Daniel Boutros,
|
|
* Christiaan Goossens,
|
|
* Jelmer Hinssen
|
|
*/
|
|
|
|
namespace Inforbank\Application;
|
|
|
|
use \Slim\App;
|
|
use Inforbank\Application\Helper\Klant;
|
|
use Inforbank\Application\Helper\Rekeningen;
|
|
|
|
class Main
|
|
{
|
|
/**
|
|
* Constructor function
|
|
* @param App $app App Dependency Injection
|
|
*
|
|
* ==============
|
|
* INSTRUCTIEBLOK
|
|
* ==============
|
|
*
|
|
* Hier wordt onze applicatie gestart. De functie hieronder wordt aangeroepen bij het starten van de app. Hier kun je dus routes toevoegen.
|
|
*
|
|
*/
|
|
public function __construct(App $app)
|
|
{
|
|
$app->get('/', function ($request, $response, $args) {
|
|
// Ophalen klant
|
|
$klant = Klant::getCurrentUser();
|
|
$rekeningen = Rekeningen::getCurrentUserRekeningen();
|
|
|
|
// Render index view
|
|
return $this->renderer->render($response, 'index.phtml', [
|
|
'klant' => $klant,
|
|
'rekeningen' => $rekeningen
|
|
]);
|
|
})->add(new Auth\Middleware());
|
|
}
|
|
}
|