| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Technically\ArrayContainer is a plain-simple PSR-11 container implementation powered by a simple associative array under the hood.
Use Composer package manager to add ArrayContainer to your project:
composer require technically/array-container
<?php
use Technically\ArrayContainer\ArrayContainer;
// ... instantiate your services: $logger, $cache, $config
// Instantiate with predefined entries
$container = new ArrayContainer([
'logger' => $logger,
'cache' => $cache,
]);
// Add more entries later
$container->set('config', $config);
// Get entries from it later in your code
$logger = $container->get('logger');All notable changes to this project will be documented in the CHANGELOG file.
| Back | FazBrowse Home | New Git URL |