asgrim/side-effect
Composer 安装命令:
composer require asgrim/side-effect
包简介
Side Effect Framework
README 文档
README
This is what stringly-typed programming is (h/t @nilsluxton)
Side effect is a middleware-ish framework that does NOT support PSR-15.
Everything is marshalling a string, basically. So, everything is __toString().
Features ✨
- 💻 Dispatch controllers (extend
\Asgrim\SideEffect\Features\AbstractControllerfor ease of use!) - 🧅 Dispatch middlewares (anything that implements
\Asgrim\SideEffect\Dispatchablecan be used!) - 💾 Perform database queries using
\Asgrim\SideEffect\Features\PerformDatabaseQuery - 🤫 Handle errors effectively with
\Asgrim\SideEffect\Features\ShutTheHellUpDecorator
Basic Usage
echo (new Framework( $serverRequest, // You could use `guzzlehttp/psr7` to make this [ // Add loads more middlewares here to do spooky things! 💕 new class extends AbstractController { public function __toString() : string { return 'Hello, world!'; } }, ] ));
Demo Script 🔥
The demo.php script shows an example application using the framework. You can base your enterprise level application
on this easy example.
You can run the demo.php script to see it in action like this:
php -S localhost:8000 demo.php
Then visit: http://localhost:8000/?who=james
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-09