-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from mathias73/dev
PR dev into master Sprint #1
- Loading branch information
Showing
38 changed files
with
2,227 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Composer | ||
composer.phar | ||
composer.bat | ||
/vendor/ | ||
|
||
# IDE / Editor | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
RewriteEngine on | ||
|
||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,12 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"App\\" : "src", | ||
"App\\Controller\\" : "src/Controller" | ||
} | ||
}, | ||
"require": { | ||
"twig/twig": "^3.0", | ||
"twbs/bootstrap": "^4.5" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
use App\Router\Router; | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
$router = new Router($_GET['url']); | ||
$router->get('/', 'Home#show'); | ||
$router->run(); |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use Twig\Environment; | ||
use Twig\Loader\FilesystemLoader; | ||
|
||
class HomeController | ||
{ | ||
public function show() | ||
{ | ||
$loader = new FilesystemLoader('src/View'); | ||
$twig = new Environment($loader,[ | ||
'cache' => false//'src/tmp', | ||
]); | ||
|
||
echo $twig->render('home.html.twig'); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.