Skip to content

Releases: kawanamiyuu/K9u.Framework

0.8.0

21 Jul 22:47
6f1250f
Compare
Choose a tag to compare

add Request Mapping mechanism (* alpha version)

alpha version means,

  • Response body will be rendered as JSON by default.
  • Handler (= Controller) classes will be parsed to collect mapping information every request. (not cached.)

use K9u\RequestMapper\Annotation\GetMapping;
use K9u\RequestMapper\PathParams;
use Psr\Http\Message\ServerRequestInterface;

class FakeController
{
    /**
     * @GetMapping("/blogs")
     *
     * @return array<string, mixed>
     */
    public function getBlogs(): array
    {
        // snip
        return ...;
    }

    /**
     * @GetMapping("/blogs/{id}")
     *
     * @param ServerRequestInterface $request
     *
     * @return array<string, mixed>
     */
    public function getBlogById(ServerRequestInterface $request): array
    {
        $pathParams = $request->getAttribute(PathParams::class);
        assert($pathParams instanceof PathParams);

        $blogId = (int) $pathParams['id'];

        // snip
        return ...;
    }
}

0.7.0

14 Jul 22:12
97917f6
Compare
Choose a tag to compare

Refactor

0.6.0

13 Jul 22:34
50f5c44
Compare
Choose a tag to compare

Refactor

0.5.0

13 Jul 15:10
4a773ed
Compare
Choose a tag to compare

0.4.0

12 Jul 22:57
83d473a
Compare
Choose a tag to compare

add FallbackHandler

0.3.0

10 Jul 12:48
13526f5
Compare
Choose a tag to compare

add Injector Factory

0.2.0

09 Jul 12:44
Compare
Choose a tag to compare

update README (add usage)

0.1.0

08 Jul 22:14
Compare
Choose a tag to compare

first unstable release

This package is spun off from "kawanamiyuu/htb-feed".