Fusion is an idea for framework. Not yet implemented!.
Fusion is optimal, lightweight and easy to use framework for routing. Fusion is focusing on dto for easy user input validation. Fusion provides:
- router
- dto
- middleware
- follows principle
code should be its own documentationmade by programmers for programmers.
<?php use fusion\{dto_provider, dto_validator};
class myDto{
#[dto_provider\body("email")] // provider
#[dto_validator\not_empty, dto_validator\email] // validators
public string $email;
};<?php use fusion\{Routes, Response, Content, Method};
// Remember to define dto
Routes::add("/", Method::POST, function(myDto $dto){
$json = json_encode(["messeage" => "success"]);
// perform something
return new Response($json, status: 200, type: Content::JSON);
});For deep explanation and more software go to documentation
