8000 GitHub - dangerousdan/DiMaria: A super fast Dependency Injection Container for PHP 7 · GitHub
[go: up one dir, main page]

Skip to content
dangerousdanPublic

About

A super fast Dependency Injection Container for PHP 7

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

Repository files navigation

DiMaria Dependency Injector

Build Status Scrutinizer Code Quality Code Coverage Build Status Code Climate SensioLabsInsight

DiMaria is a Dependency Injection Container for PHP 7+ with no dependencies. It's written to be extremely fast and lightweight.

Installation

Fetch DiMaria with composer via packagist. Add it with

composer require dangerousdan/dimaria

Usage

DiMaria should work out of the box. Just call get() with the class name you wish to create.

$di = new DD\DiMaria;
$object = $di->get('ClassName');

DiMaria implements the PSR7 Container interface.

DiMaria can:

  • Automatically fetch type-hinted dependencies in classes
  • Set and override parameters and create aliases
  • Set preferences for interfaces or classes
  • Configure classes to return shared or new instances
  • Support variadic parameters
  • Configure Setter injection

For more info, see the docs

DiMaria

About

A super fast Dependency Injection Container for PHP 7

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0