2017 © Pedro Peláez
 

library container

Simple and lightweight Dependency Injection Container

image

flamecore/container

Simple and lightweight Dependency Injection Container

  • Monday, September 14, 2015
  • by secondtruth
  • Repository
  • 7 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

FlameCore Container

Build Status Scrutinizer Coverage License, (*1)

This library provides a simple and lightweight Dependency Injection Container., (*2)

Features

  • Interfaces: Extended container interfaces compatible with container-interop, (*3)

    • EditableContainerInterface, (*4)

    • LockableContainerInterface, (*5)

  • Classes: Advanced and feature-complete container implementations based on the interfaces, (*6)

    • EditableContainer, (*7)

    • LockableContainer, (*8)

Usage

To make use of the API, include the vendor autoloader and use the classes:, (*9)

namespace Acme\MyApplication;

use FlameCore\Container\EditableContainer;

$container = new EditableContainer();

You can define() items to require a value type. To assign values to items, use the set() method., (*10)

$container->define('bar', 'Acme\MyApplication\Config'); // or 'Config::class'
$container->set('bar', new Config());
$container->has('bar');
$container->get('bar');

This works also with arrays and scalar types:, (*11)

$container->define('foo', ':string');
$container->set('foo', 'bar');

Installation

Install via Composer

Install Composer if you don't already have it present on your system:, (*12)

$ curl -sS https://getcomposer.org/installer | php

To install the library, run the following command and you will get the latest version:, (*13)

$ composer require flamecore/container

Requirements

  • You must have at least PHP version 5.4 installed on your system.

Contributors

If you want to contribute, please see the CONTRIBUTING file first., (*14)

Thanks to the contributors:, (*15)

  • Christian Neff (secondtruth)

The Versions

14/09 2015

1.0.x-dev

1.0.9999999.9999999-dev http://www.flamecore.org

Simple and lightweight Dependency Injection Container

  Sources   Download

ISC

The Requires

 

The Development Requires

container dependency-injection

14/09 2015

dev-master

9999999-dev http://www.flamecore.org

Simple and lightweight Dependency Injection Container

  Sources   Download

ISC

The Requires

 

The Development Requires

container dependency-injection

14/09 2015

v1.0.0

1.0.0.0 http://www.flamecore.org

Simple and lightweight Dependency Injection Container

  Sources   Download

ISC

The Requires

 

The Development Requires

container dependency-injection