FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

technically-php/array-container: 🗳 Plain-simple array container implementation for PSR-11. PHP8-ready :fire: · GitHub

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Technically Array Container

Technically\ArrayContainer is a plain-simple PSR-11 container implementation powered by a simple associative array under the hood.

Features

  • PSR-11
  • PHP 8.0+
  • Semver
  • Tests

Installation

Use Composer package manager to add ArrayContainer to your project:

composer require technically/array-container

Example

<?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');

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

Credits

About

🗳 Plain-simple array container implementation for PSR-11. 🐘 PHP8-ready 🔥

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL