承接 zloynick/joole-components-container 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

zloynick/joole-components-container

Composer 安装命令:

composer require zloynick/joole-components-container

包简介

README 文档

README

This component allows you to register containers with objects, "pulling" dependencies from other containers. The component is based on the joole-containers library.

Getting started

  • Install this dependency via composer: composer install zloynick/joole-components-container

Configuration

Add to components this in your joole.php configuration file:


'components' => [
        ...,
        [
            'name' => 'containers',
            'class' => \joole\components\containers\ContainersComponent::class,
            // Containers and their configuration.
            'options' => [
                'main' => [
                    ...,
                    ['class' => \joole\reflector\Reflector::class,],
                    ...,
                ],
                // You also can use dependencies for object building with:
                'my_custom_container' => [
                    ...
                    [
                        'class' => '\YourClass',
                        // A "YourClass" object will be created using a Reflector object from another container 
                        // if there is a "Reflector" type parameter in the object constructor.
                        'depends' => [
                            [
                                'class' => \joole\reflector\Reflector::class,
                                'owner' => 'main',
                            ],
                        ]
                    ],
                ],
                // The component also accepts input parameters for objects. Each of the parameters 
                // is a data type and it is important to understand this.
                'events_container' => [
                    [
                        'class' => '\EventStack',
                        // EventStack::__construct(bool $cleanAfterExecution, array $allowedEvents)
                        'params' => [
                            'cleanAfterExecution' => true,
                            'allowedEvents' => [
                                '\CustomEvent1',
                                '\CustomEvent2',
                            ],
                        ],
                    ]
                ]
            ],
            'routes' => __DIR__.'/routes/',
        ],
        ...,
    ],

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2022-04-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固