huid/container
Composer 安装命令:
composer require huid/container
包简介
php code template
关键字:
README 文档
README
可扩展的运行 php 代码容器
Feature
- 直接
bind定回调
use Huid\Application; $application = new Application $application->bind('hello', function () { return 'hello world'; }); echo $application->hello();
- 直接注入
plugin
# 定义如下 `plugin` 文件 class Huid\Application\plugins; class HelloWorld implements PluginContract { public static function install(Application $application, ...$opt) { $application->bind('hello', function () { return 'hello world plugin'; }); } } # 运行 use Huid\Application; use Huid\Application\Plugins\HelloWorldPlugin; $application = new Application $application->use(HelloWorldPlugin::class); echo $application->hello();
Inspire
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-14