Releases: kawanamiyuu/K9u.Framework
Releases · kawanamiyuu/K9u.Framework
0.8.0
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
Refactor
0.6.0
Refactor
0.5.0
- add demo application
- inject StreamFactory
0.4.0
add FallbackHandler
0.3.0
add Injector Factory
0.2.0
update README (add usage)
0.1.0
first unstable release
This package is spun off from "kawanamiyuu/htb-feed".