Last active
May 26, 2016 21:56
-
-
Save funkytaco/6e12ffd25ea28bd6b11802fb360b9779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return [ | |
//Routes. | |
/** HTTP Method - URI - Array[Controller, controller method to call] **/ | |
['GET', '/', [$IndexCtrl, 'get']], | |
['GET', '/about', [$IndexCtrl, 'getAbout']], | |
['GET', '/contact', [$IndexCtrl, 'getContact']] | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
namespace ProjectX; | |
use ProjectX\Presentation\Controller\Resource; | |
use ProjectX\Presentation\Controller\Error; | |
use ProjectX\Presentation\Controller\Index; | |
/** @var \CodeCollab\Router\Router $router */ | |
$router | |
->get('/js/{filename:.+}', [Resource::class, 'renderJavascript']) | |
->get('/css/{filename:.+}', [Resource::class, 'renderStylesheet']) | |
->get('/not-found', [Error::class, 'notFound']) | |
->get('/method-not-allowed', [Error::class, 'methodNotAllowed']) | |
->get('/', [Index::class, 'index']); | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment