thgs/amphp-bootstrap 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thgs/amphp-bootstrap

最新稳定版本:v0.5.0

Composer 安装命令:

composer require thgs/amphp-bootstrap

包简介

A package that guides the boot process of an Amphp HTTP server

README 文档

README

Note that this package is at an experimental/exploratory stage.

This is a convenience package that boots an Amphp HTTP server. It exports configuration objects that are used as input and loaders for the config for a few basic formats. It requires a container implementation to be adapted to an interface, however some basic adapters are already provided for some container packages.

Features

  • With the container integration you can setup your routes and use DI.

Usage

You can boot it like this, example below is with Auryn Injector.

use Auryn\Injector;
use thgs\Bootstrap\Bootstrap;
use thgs\Bootstrap\Config\Loader\PhpFileLoader;
use thgs\Bootstrap\DependencyInjection\AurynInjector;

require \dirname(__DIR__) . '/vendor/autoload.php';

// Loader for config.php which contains the main configuration
$loader = new PhpFileLoader(getcwd() . '/' . ($argv[1] ?? 'config.php'));

// Pick an injector
$injector = new AurynInjector(new Injector());

// Finally, boot everything
new Bootstrap($loader->load(), $injector);

See examples/ directory for a sample configuration. All configuration objects contain the various options you could set up using Amphp directly as arguments of the constructor.

Out of the box this package supports the below injectors/containers:

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固