fqapps/swoole-gin-framework

v1.0.0 2022-04-01 06:18 UTC

This package is auto-updated.

Last update: 2024-04-29 05:05:53 UTC


README

teaching repository

How to install

$ composer create-project lazychanger/swoole-gin-framework

How to use

<?php
declare(strict_types=1);

class HelloAction implements \SwooleGin\HandlerFuncInterface
{

    public function __invoke(\Psr\Http\Message\ResponseInterface $rw, \Psr\Http\Message\RequestInterface $req)
    {
        $rw->withBody(new \SwooleGin\Stream\StringStream('Hello World'));
        return $rw;
    }
}