Applicatiebasis, incl. instructie
This commit is contained in:
		
							
								
								
									
										38
									
								
								src/Application/Main.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src/Application/Main.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
<?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 {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 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('/[{name}]', function ($request, $response, $args) {
 | 
			
		||||
            // Render index view
 | 
			
		||||
            return $this->renderer->render($response, 'index.phtml', $args);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user