yosko/watamelo
Composer 安装命令:
composer require yosko/watamelo
包简介
small PHP MVC Framework
README 文档
README
Watamelo is a small and rather lightweight PHP Framework under the GNU LGPL licence.
It is currently a work in progress. This means that it might be unstable, and every way of doing things is subject to change in future versions.
Requirements
Watamelo requires:
- PHP 8.2 or above
- Apache URL rewriting module (although it might be easy to work with other web server's rewriting approach)
Install the framework via Composer
You can use either start from the skeleton repo (see instructions there) or start from scratch
Start from scratch
First, set your composer.json:
{
...
"require": {
"yosko/watamelo": "dev-master"
}
}
Or you can use any tagged version such as "^1.3" instead of "dev-master".
Then install the framework:
composer install
Quick Start
The easiest way to start is using the watamelo-skeleton repository.
Otherwise, you can create a minimalist application in 3 steps:
Define your App (here an example in
src/App.php):class App extends \Watamelo\Framework\AbstractApplication { public function init($router) { $router->get('/', \App\Controller\MainController::class, 'hello'); } public function execute($router) { $router->dispatch(); } }Create your action (typically in a Handler class such as a "Controller"; here an example in
src/Controller/MainController.php):class MainController { public function hello() { echo "Hello Watamelo!"; } }Launch it (here an example in
public/index.php):(new \App\App())->run();
Documentation
See specific documentation files for more detailed information:
FAQ
If you have any question or suggestion, please feel free to contact me or post an issue on the Github page of the project.
统计信息
- 总下载量: 79
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0-or-later
- 更新时间: 2026-04-28