larium / framework
A PSR-15 framework.
0.0.9
2023-04-26 20:59 UTC
Requires
- php: ^7.3 || ^8.0
- psr/container: ^1.0
- psr/http-factory: ^1.0
- psr/http-message: ~1.0
- psr/http-server-handler: ~1.0
- psr/http-server-middleware: ~1.0
Requires (Dev)
- laminas/laminas-diactoros: ^2.25
- nikic/fast-route: ~1.3.0
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-10-31 00:17:23 UTC
README
Example
<?php # public/index.php declare(strict_types = 1); use Larium\Framework\Framework; use Larium\Framework\Middleware\RoutingMiddleware; use Laminas\Diactoros\ServerRequestFactory; use Larium\Framework\Middleware\ActionResolverMiddleware; use Larium\Framework\Provider\ContainerProvider; require_once __DIR__ . '/../vendor/autoload.php'; (function () { /** @var ContainerProvider */ $containerProvider $container = $containerProvider->getContainer(); $f = new Framework($container); $f->pipe(RoutingMiddleware::class, 1); $f->pipe(ActionResolverMiddleware::class, 0); $f->run(ServerRequestFactory::fromGlobals()); })();