chubbyphp / Chubbyphp Framework
Licence: mit
A based PSR-15 microframework that also sets maximum flexibility with minimum complexity and easy replaceability of the individual components, but also of the framework.
Stars: ✭ 69
Projects that are alternatives of or similar to Chubbyphp Framework
Pure Http
✨ The simple web framework for Node.js with zero dependencies.
Stars: ✭ 139 (+101.45%)
Mutual labels: api, middleware, framework
Foxify
The fast, easy to use & typescript ready web framework for Node.js
Stars: ✭ 138 (+100%)
Mutual labels: api, middleware, framework
Copper
Copper is a set of Go packages that help you build backend APIs quickly and with less boilerplate.
Stars: ✭ 35 (-49.28%)
Mutual labels: api, middleware
Apicache
Simple API-caching middleware for Express/Node.
Stars: ✭ 957 (+1286.96%)
Mutual labels: api, middleware
Molten
A minimal, extensible, fast and productive framework for building HTTP APIs with Python 3.6 and later.
Stars: ✭ 964 (+1297.1%)
Mutual labels: api, framework
Outputcache
Cache api responses using Redis, Memcached or any cache provider for NodeJS
Stars: ✭ 9 (-86.96%)
Mutual labels: api, middleware
Opensourcetest
OpenSourceTest由自动化测试-夜行者社区维护,提供的是更多地灵活性和可配置性
Stars: ✭ 37 (-46.38%)
Mutual labels: api, framework
Rest Control
Framework for testing and validation REST services
Stars: ✭ 51 (-26.09%)
Mutual labels: api, framework
Dragon
⚡A powerful HTTP router and URL matcher for building Deno web servers.
Stars: ✭ 56 (-18.84%)
Mutual labels: middleware, framework
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+57273.91%)
Mutual labels: api, framework
Altair
Lightweight and Robust API Gateway written in Go
Stars: ✭ 34 (-50.72%)
Mutual labels: api, middleware
Currencyviewer
Short python framework that dynamically displays and converts the cryptocurrencies in your Kraken wallet into equivalents fiat money.
Stars: ✭ 13 (-81.16%)
Mutual labels: api, framework
Cli
GraphQL back-end framework with first-class Typescript support
Stars: ✭ 37 (-46.38%)
Mutual labels: api, framework
Falcon
The no-nonsense REST API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
Stars: ✭ 8,654 (+12442.03%)
Mutual labels: api, framework
Api Platform
Create REST and GraphQL APIs, scaffold Jamstack webapps, stream changes in real-time.
Stars: ✭ 7,144 (+10253.62%)
Mutual labels: api, framework
Kona
a node.js service framework built on koa.js (generators)
Stars: ✭ 23 (-66.67%)
Mutual labels: api, middleware
chubbyphp-framework
Description
A based PSR-15 microframework that also sets maximum flexibility with minimum complexity and easy replaceability of the individual components, but also of the framework. It's currently one of the fastest PSR-15 based framework (php-fpm) on the market.
- 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)
Requirements
- php: ^7.4|^8.0
- psr/container: ^1.0|^2.0
- psr/http-factory: ^1.0.1
- psr/http-message-implementation: ^1.0
- psr/http-message: ^1.0.1
- psr/http-server-handler: ^1.0.1
- psr/http-server-middleware: ^1.0.1
- psr/log: ^1.1
Suggest
Router
Any Router which implements Chubbyphp\Framework\Router\RouterInterface
can be used.
- chubbyphp/chubbyphp-framework-router-aura: ^1.0
- chubbyphp/chubbyphp-framework-router-fastroute: ^1.0
- chubbyphp/chubbyphp-framework-router-sunrise: ^1.0
- chubbyphp/chubbyphp-framework-router-symfony: ^1.0
PSR 7 / PSR 17
- bittyphp/http: ^2.0
- guzzlehttp/psr7: ^1.4.2 (with http-interop/http-factory-guzzle: ^1.0)
- nyholm/psr7: ^1.0
- slim/psr7: ^0.5|^1.0
- sunrise/http-message: ^1.0 (with sunrise/http-factory: ^1.0)
- laminas/laminas-diactoros: ^2.0
Installation
Through Composer as chubbyphp/chubbyphp-framework.
composer require chubbyphp/chubbyphp-framework "^3.4" \
chubbyphp/chubbyphp-framework-router-fastroute "^1.1" \
slim/psr7 "^1.3"
Usage
<?php
declare(strict_types=1);
namespace App;
use Chubbyphp\Framework\Application;
use Chubbyphp\Framework\Middleware\ExceptionMiddleware;
use Chubbyphp\Framework\Middleware\RouterMiddleware;
use Chubbyphp\Framework\RequestHandler\CallbackRequestHandler;
use Chubbyphp\Framework\Router\FastRoute\Router;
use Chubbyphp\Framework\Router\Route;
use Psr\Http\Message\ServerRequestInterface;
use Slim\Psr7\Factory\ResponseFactory;
use Slim\Psr7\Factory\ServerRequestFactory;
require __DIR__.'/vendor/autoload.php';
$responseFactory = new ResponseFactory();
$app = new Application([
new ExceptionMiddleware($responseFactory, true),
new RouterMiddleware(new Router([
Route::get('/hello/{name:[a-z]+}', 'hello', new CallbackRequestHandler(
static function (ServerRequestInterface $request) use ($responseFactory) {
$response = $responseFactory->createResponse();
$response->getBody()->write(sprintf('Hello, %s', $request->getAttribute('name')));
return $response;
}
))
]), $responseFactory),
]);
$app->emit($app->handle((new ServerRequestFactory())->createFromGlobals()));
Emitter
Middleware
- CallbackMiddleware
- ExceptionMiddleware
- LazyMiddleware
- MiddlewareDispatcher
- NewRelicRouteMiddleware
- RouterMiddleware
- SlimCallbackMiddleware
- SlimLazyMiddleware
RequestHandler
Router
Server
Skeleton
Migration
Copyright
Dominik Zogg 2021
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].