All Projects → chubbyphp → Chubbyphp Framework

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.

Projects that are alternatives of or similar to Chubbyphp Framework

Yarf
Yet Another REST Framework
Stars: ✭ 62 (-10.14%)
Mutual labels:  api, framework, micro-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
Looli
a tiny web framework
Stars: ✭ 45 (-34.78%)
Mutual labels:  middleware, framework
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
Broid Kit
Bot framework powered by Broid
Stars: ✭ 58 (-15.94%)
Mutual labels:  api, framework
Whatsapp Framework
⚗️Whatsapp python api
Stars: ✭ 945 (+1269.57%)
Mutual labels:  api, 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

CI Coverage Status Infection MSI Latest Stable Version Total Downloads Monthly Downloads

bugs code_smells coverage duplicated_lines_density ncloc sqale_rating alert_status reliability_rating security_rating sqale_index vulnerabilities

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.

Application workflow

Requirements

Suggest

Router

Any Router which implements Chubbyphp\Framework\Router\RouterInterface can be used.

PSR 7 / PSR 17

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

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].