- Notifications
You must be signed in to change notification settings - Fork4
A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
License
chubbyphp/chubbyphp-framework
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A minimal, highlyperformant middlewarePSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
- Basic Coding Standard (1)
- Coding Style Guide (2)
- Logger Interface (3)
- Autoloading Standard (4)
- HTTP Message Interface (7)
- Container Interface (11)
- HTTP Handlers (15)
- HTTP Factories (17)
- php: ^8.2
- chubbyphp/chubbyphp-http-exception: ^1.2
- psr/container: ^1.1.2|^2.0.2
- psr/http-factory-implementation: ^1.0
- psr/http-factory: ^1.1
- psr/http-message-implementation: ^1.0|^2.0
- psr/http-message: ^1.1|^2.0
- psr/http-server-handler: ^1.0.2
- psr/http-server-middleware: ^1.0.2
- psr/log: ^2.0|^3.0.2
Any Router which implementsChubbyphp\Framework\Router\RouteMatcherInterface
can be used.
- guzzlehttp/psr7: ^2.7 (withhttp-interop/http-factory-guzzle: ^1.2)
- laminas/laminas-diactoros: ^3.5
- nyholm/psr7: ^1.8.2
- slim/psr7: ^1.7
- sunrise/http-message: ^3.2
ThroughComposer aschubbyphp/chubbyphp-framework.
composer require chubbyphp/chubbyphp-framework"^5.2" \ chubbyphp/chubbyphp-framework-router-fastroute"^2.1" \ slim/psr7"^1.7"
<?phpdeclare(strict_types=1);namespaceApp;useChubbyphp\Framework\Application;useChubbyphp\Framework\Middleware\ExceptionMiddleware;useChubbyphp\Framework\Middleware\RouteMatcherMiddleware;useChubbyphp\Framework\RequestHandler\CallbackRequestHandler;useChubbyphp\Framework\Router\FastRoute\RouteMatcher;useChubbyphp\Framework\Router\Route;useChubbyphp\Framework\Router\RoutesByName;usePsr\Http\Message\ServerRequestInterface;useSlim\Psr7\Factory\ResponseFactory;useSlim\Psr7\Factory\ServerRequestFactory;require__DIR__.'/vendor/autoload.php';$responseFactory =newResponseFactory();$app =newApplication([newExceptionMiddleware($responseFactory,true),newRouteMatcherMiddleware(newRouteMatcher(newRoutesByName([ Route::get('/hello/{name:[a-z]+}','hello',newCallbackRequestHandler(staticfunction (ServerRequestInterface$request)use ($responseFactory) {$response =$responseFactory->createResponse();$response->getBody()->write(sprintf('Hello, %s',$request->getAttribute('name')));return$response; } )) ]))),]);$app->emit($app->handle((newServerRequestFactory())->createFromGlobals()));
- CallbackMiddleware
- ExceptionMiddleware
- LazyMiddleware
- MiddlewareDispatcher
- RouteMatcherMiddleware
- SlimCallbackMiddleware
- SlimLazyMiddleware
- CallbackRequestHandler
- LazyRequestHandler
- RouteRequestHandler
- SlimCallbackRequestHandler
- SlimLazyRequestHandler
2025 Dominik Zogg
About
A minimal, highly performant middleware PSR-15 microframework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.