zendframework/zend-auradi-config

Name: zend-auradi-config

Owner: Zend Framework

Description: Aura.Di container configurator based on ZF ServiceManager configuration

Created: 2017-09-27 20:32:59.0

Updated: 2018-04-11 17:45:59.0

Pushed: 2018-04-11 17:46:00.0

Homepage:

Size: 86

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

zend-auradi-config

Build Status Coverage Status

This library provides utilities to configure a PSR-11 compatible Aura.Di container using zend-servicemanager configuration.

Installation

Run the following to install this library:

mposer require zendframework/zend-auradi-config
Configuration

To get a configured Aura.Di container, do the following:

p
Zend\AuraDi\Config\Config;
Zend\AuraDi\Config\ContainerFactory;

tory = new ContainerFactory();

tainer = $factory(
new Config([
    'dependencies' => [
        'services'   => [],
        'invokables' => [],
        'factories'  => [],
        'aliases'    => [],
        'delegators' => [],
    ],
    // ... other configuration
])

The dependencies sub associative array can contain the following keys:

Please note, that the whole configuration is available in the $container on config key:

fig = $container->get('config');
Using with Expressive

Replace the contents of config/container.php with the following:

p

Zend\AuraDi\Config\Config;
Zend\AuraDi\Config\ContainerFactory;

fig  = require __DIR__ . '/config.php';
tory = new ContainerFactory();

rn $factory(new Config($config));

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.