Download the PHP package zloynick/joole-components-container without Composer
On this page you can find all versions of the php package zloynick/joole-components-container. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package joole-components-container
Joole Component: Containers
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/',
],
...,
],
All versions of joole-components-container with dependencies
PHP Build Version
Package Version
Requires
php Version
8.1.*
zloynick/joole-containers Version ^8.1.3
zloynick/joole-framework Version ^8.1.3
zloynick/joole-reflector Version ^2.1.5
zloynick/joole-containers Version ^8.1.3
zloynick/joole-framework Version ^8.1.3
zloynick/joole-reflector Version ^2.1.5
The package zloynick/joole-components-container contains the following files
Loading the files please wait ....