Created
February 14, 2015 00:01
-
-
Save brandonsavage/9661cb584fe7c2d7ee5a to your computer and use it in GitHub Desktop.
The configuration file for the final lesson.
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 | |
$path = realpath(__DIR__ . '/..'); | |
return array( | |
'path' => $path, | |
'database' => array( | |
'user' => 'root', | |
'pass' => 'root', | |
'host' => 'localhost', | |
'name' => 'masterclass', | |
), | |
'routes' => array( | |
'/' => ['class' => 'Masterclass\Controller\Index:index', 'type' => 'GET'], | |
'/story' => ['class' => 'Masterclass\Controller\Story:index', 'type' => 'GET'], | |
'/story/create' => ['class' => 'Masterclass\Controller\Story:create', 'type' => 'GET'], | |
'/story/create/save' => ['class' => 'Masterclass\Controller\Story:create', 'type' => 'POST'], | |
'/comment/create' => ['class' => 'Masterclass\Controller\Comment:create', 'type' => 'POST'], | |
'/user/create' => ['class' => 'Masterclass\Controller\User:create', 'type' => 'GET'], | |
'/user/account/create' => ['class' => 'Masterclass\Controller\User:create', 'type' => 'POST'], | |
'/user/account' => ['class' => 'Masterclass\Controller\User:account', 'type' => 'GET'], | |
'/user/account/save' => ['class' => 'Masterclass\Controller\User:account', 'type' => 'POST'], | |
'/user/login/check' => ['class' => 'Masterclass\Controller\User:login', 'type' => 'POST'], | |
'/user/login' => ['class' => 'Masterclass\Controller\User:login', 'type' => 'GET'], | |
'/user/logout' => ['class' => 'Masterclass\Controller\User:logout', 'type' => 'GET'], | |
), | |
'config_classes' => [ | |
'Masterclass\Configuration\DiConfig', | |
'Masterclass\Configuration\RouterConfig', | |
'Masterclass\Configuration\Web', | |
'Masterclass\Configuration\View', | |
], | |
'layouts' => [ | |
'layout' => $path . '/views/layout.php', | |
], | |
'views' => [ | |
'index' => $path . '/views/index.php', | |
'story' => $path . '/views/story.php', | |
'story_create' => $path . '/views/story_create.php', | |
'error' => $path . '/views/error.php', | |
] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment