1
0
This repository has been archived on 2017-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
informaticaD4P-2017/src/Application/Main.php

44 lines
964 B
PHP
Raw Normal View History

2017-02-18 18:49:26 +00:00
<?php
/**
* Informatica Eindproject D4p
* 6in3, Stedelijk Gymnasium Nijmegen
* Docent: Hans de Wolf
*
* ==================
*
* Daniel Boutros,
* Christiaan Goossens,
* Jelmer Hinssen
*/
namespace InfD4p\Application;
use \Slim\App;
class Main
{
2017-02-18 18:49:26 +00:00
/**
* 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)
{
// Load the API handler for the Omnipay plugin
new API\Handler($app);
// Add the default view routes
2017-02-18 18:49:26 +00:00
$app->get('/[{name}]', function ($request, $response, $args) {
// Render index view
return $this->renderer->render($response, 'index.phtml', $args);
});
}
}