2017 © Pedro Peláez
 

library quark

Another dependency injection container

image

marcojetson/quark

Another dependency injection container

  • Saturday, May 30, 2015
  • by marcojetson
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Quark

Another dependency injection container, (*1)

Build status Test coverage, (*2)

Services

Register services using set and providing an identifier and a factory, (*3)

$application->set('service', function () {
    return new stdClass();
});

Access the service anywhere in your application, (*4)

$service = $application->service;

If you want to share the same instance across your application use share, (*5)

$application->share('service', function () {
    return new stdClass();
});

You can provide arguments for your services, (*6)

$application->set('person', function ($name) {
    $person = new stdClass();
    $person->name = $name;

    return $person;
});

$person = $application->person('Marco');

The Versions

30/05 2015

dev-master

9999999-dev

Another dependency injection container

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6

 

The Development Requires

dependency injection container di