xenokore/component-loader
Composer 安装命令:
composer require xenokore/component-loader
包简介
Component loader for the Xeno framework
README 文档
README
A library that helps with loading Xeno compatible components. Libraries that are compatible will be able to easily expose autowire definitions for a DI container, expose Twig templates, etc...
Installation
composer require xenokore/component-loader
Usage
$component_loader = new Xenokore\ComponentLoader\Loader('/vendor'); // When using PHP-DI $builder = new DI\ContainerBuilder(); $builder->useAnnotations(true); $builder->useAutowiring(true); $builder->addDefinitions( $component_loader->getContainerDefinitions() );
Creating a component
- Create a
/componentdirectory in the root of your component library - Add your DI container definitions in
/component/container.php - Require your component using composer in a project or framework that uses the Xeno Component Loader
- Your definitions will be automatically added to the main DI container
Status
Currently only container definitions are supported. Twig templates still have to be added. And there will most likely be more features than this.
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-12