dkx/slim-nette-di

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

Nette DI integration into Slim

0.0.1 2019-08-24 10:08 UTC

This package is auto-updated.

Last update: 2024-01-24 20:20:40 UTC


README

Nette DI integration into Slim

Installation

$ composer require dkx/slim-nette-di

Usage

config.neon:

extensions:
  slim: DKX\SlimNette\DI\SlimExtension

Configuration

<?php

use DKX\SlimNette\Configuration\ApplicationConfiguratorInterface;
use Slim\App;

final class AppConfiguration implements ApplicationConfiguratorInterface
{
    public function configure(App $app): void
    {
        $app->addRoutingMiddleware();
        // todo configure other middlewares and routes
    }
}

config.neon:

extensions:
  slim: DKX\SlimNette\DI\SlimExtension

slim:
  configurators:
    - AppConfiguration

services:
  - AppConfiguration