decodelabs/fabric
最新稳定版本:v0.10.6
Composer 安装命令:
composer require decodelabs/fabric
包简介
Lightweight PHP framework implementation using DecodeLabs ecosystem
README 文档
README
Lightweight PHP framework implementation using DecodeLabs ecosystem
Fabric provides the structures, prerequisites and conventions for building a web application using the DecodeLabs ecosystem.
Installation
This package requires PHP 8.4 or higher.
Install via Composer:
composer require decodelabs/fabric
Usage
A Fabric app looks very similar to a standard package with most code residing in the src folder, under a namespace of your choice and loaded via composer.
Bootstrapping
Fabric uses Genesis for bootstrapping your application. Add the DecodeLabs\Fabric\Genesis\Hub class to your composer.json file:
{
"extra": {
"genesis": {
"hub": "DecodeLabs\\Fabric\\Genesis\\Hub"
}
}
}
Then point your HTTP server to rewite to vendor/genesis.php as your entry point. Genesis takes care of the rest.
Config
Fabric utilises Dovetail for config loading - via a private .env file in the app root and data files in /config (though this can be customised if necessary).
The most important config file is the Environment.php file which defines some key values for the rest of the app to initialize with.
The appNamespace value will allow you to define the namespace in which the majority of your app code will reside, and which is already defined for loading in your composer file.
Kingdom
Coming soon
Structure
Fabric provides solid HTTP and CLI kernels that can handle requests in both contexts. Clip is used for CLI tasks, and Harvest for HTTP.
The HTTP kernel uses an extensible set of Middlewares to provide a flexible request handling pipeline. The default implementation is provided by Harvest and is a good starting point for most apps.
Greenleaf is used for routing and provides a simple, flexible and powerful routing system for HTTP Actions.
Licensing
Fabric is licensed under the MIT License. See LICENSE for the full license text.
统计信息
- 总下载量: 1.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-11-27