Vendor lock
This commit is contained in:
31
vendor/zeuxisoo/slim-whoops/examples/index.php
vendored
Normal file
31
vendor/zeuxisoo/slim-whoops/examples/index.php
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Slim\Factory\AppFactory;
|
||||
|
||||
use Zeuxisoo\Whoops\Slim\WhoopsMiddleware;
|
||||
|
||||
// Instance
|
||||
$app = AppFactory::create();
|
||||
|
||||
// Middleware
|
||||
$app->add(new WhoopsMiddleware());
|
||||
|
||||
// Route parser
|
||||
$routeParser = $app->getRouteCollector()->getRouteParser();
|
||||
|
||||
// Routes
|
||||
$app->get('/', function (Request $request, Response $response, $args) use ($routeParser) {
|
||||
$response->getBody()->write(file_get_contents('template/index.php'));
|
||||
|
||||
return $response;
|
||||
});
|
||||
|
||||
$app->get('/url-path-not-exists', function(Request $request, Response $response, $args) use ($routeParser) {
|
||||
return $routeParser->urlFor('hello');
|
||||
});
|
||||
|
||||
// Run
|
||||
$app->run();
|
39
vendor/zeuxisoo/slim-whoops/examples/template/index.php
vendored
Normal file
39
vendor/zeuxisoo/slim-whoops/examples/template/index.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Slim Whoops Examples</title>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
</head>
|
||||
<style type="text/css">
|
||||
.part {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h3>Examples</h3>
|
||||
<hr>
|
||||
<div class="part">
|
||||
<h5>Usage</h5>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30%">File / Path</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/url-path-not-exists">/url-path-not-exists</a>
|
||||
</td>
|
||||
<td>Basic middleware usage</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user