ethanhann/fizzy
Composer 安装命令:
composer require ethanhann/fizzy
包简介
A DTO-centric, PHP 7 micro Web API framework built on Silex.
README 文档
README
Installation
Create a composer.json file in your project root.
composer init
Add your namespace directory to your composer.json file.
"autoload": { "psr-4": { "MyNamespace\\": "src/MyNamespace" } },
Require Fizzy.
composer require ethanhann/fizzy
Configuration
Copy the config.dist.json to the project root. Adjust the baseUrl and namespacePrefix as appropriate. Note that the config file can be called anything, but the name in the index.php file will need to be updated.
{
"baseUrl": "api",
"namespacePrefix": "MyNamespace",
"httpMethodNames": ["get", "getList", "post", "put", "delete"],
"contentNegotiation" : {
"priorities": ["json", "xml"]
}
}
Run the App
<?php // web/index.php $loader = require_once __DIR__ . '/../vendor/autoload.php'; (new \Eeh\Fizzy\App('../config.json', $loader)) ->configure() ->run();
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-07