readd implementation folder
This commit is contained in:
parent
7ff078b16f
commit
a4f171b98c
80 changed files with 8471 additions and 0 deletions
18
implementation/03/composer.json
Normal file
18
implementation/03/composer.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "lubiana/no-framework",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Lubiana\\NoFramework\\": "src/"
|
||||
}
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "example",
|
||||
"email": "test@example.com"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"filp/whoops": "^2.14"
|
||||
}
|
||||
}
|
BIN
implementation/03/public/favicon.ico
Normal file
BIN
implementation/03/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
3
implementation/03/public/index.php
Normal file
3
implementation/03/public/index.php
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
require __DIR__ . '/../src/Bootstrap.php';
|
27
implementation/03/src/Bootstrap.php
Normal file
27
implementation/03/src/Bootstrap.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Lubian\NoFramework;
|
||||
|
||||
use Whoops\Handler\PrettyPageHandler;
|
||||
use Whoops\Run;
|
||||
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
$environment = getenv('ENVIRONMENT') ?: 'dev';
|
||||
|
||||
error_reporting(E_ALL);
|
||||
|
||||
$whoops = new Run();
|
||||
|
||||
if ($environment === 'dev') {
|
||||
$whoops->pushHandler(new PrettyPageHandler());
|
||||
} else {
|
||||
$whoops->pushHandler(function (\Throwable $t) {
|
||||
error_log('ERROR: ' . $t->getMessage(), $t->getCode());
|
||||
echo 'Oooopsie';
|
||||
});
|
||||
}
|
||||
|
||||
$whoops->register();
|
||||
|
||||
echo 'Hello World!';
|
Loading…
Add table
Add a link
Reference in a new issue