teqfw/back-di-php

This package is abandoned and no longer maintained. No replacement package was suggested.

Dependency Injection container for Tequila Framework (PHP)

dev-master 2019-01-08 20:57 UTC

This package is auto-updated.

Last update: 2020-12-09 06:01:45 UTC


README

Dependency Injection in TeqFW

Based on league/container 3.x.

Create classes based on TeqFW conventions:

  • \Vendor\Path\To\Module\Api\Path\To\Class => \Vendor\Path\To\Module\Path\To\Class

Usage

$container = \TeqFw\Lib\Di\Api\ContainerFactory::getContainer();
/** @var \Vendor\Path\To\Module\Db\Repo\User $user */
$user = $container->get(\Vendor\Path\To\Module\Api\Db\Repo\User::class)