papimod/common
最新稳定版本:v2.1.1
Composer 安装命令:
composer require papimod/common
包简介
Module Papi
README 文档
README
Description
Help configuring middlewares provided by Slim in your papi.
Prerequisites Modules
Configuration
ALLOW_BODY_PARSING (.ENV)
| Required | No |
| Type | int |
| Description | Allow body parsing middleware |
| Default | 1 |
ALLOW_ROUTING (.ENV)
| Required | No |
| Type | int |
| Description | Allow routing middleware |
| Default | 1 |
Definitions
Usage
Module
You can add the following options to your .env file:
ALLOW_ROUTING=1 ALLOW_BODY_PARSING=1
Import the module when creating your application:
require __DIR__ . "/../vendor/autoload.php"; use Papi\PapiBuilder; use Papimod\Dotenv\DotEnvModule; use Papimod\Common\CommonModule; use function DI\create; $builder = new PapiBuilder(); $builder ->setModule( DotEnvModule::class, # Prerequisite CommonModule::class ) ->build() ->run();
Custom implementation
You can also import only the items of your choice:
require __DIR__ . "/../vendor/autoload.php"; use Papi\PapiBuilder; use Papimod\Dotenv\DotEnvModule; use Papimod\Common\middleware\RoutingMiddleware; use function DI\create; $builder = new PapiBuilder(); $builder ->setMiddleware(RoutingMiddleware::class) ->build() ->run();
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-12-18