2017 © Pedro Peláez
 

library slim-nette-bridge

Slim Framework bridge for Nette DI.

image

oops/slim-nette-bridge

Slim Framework bridge for Nette DI.

  • Thursday, November 30, 2017
  • by jiripudil
  • Repository
  • 2 Watchers
  • 9 Stars
  • 4,058 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 83 % Grown

The README.md

Oops/SlimNetteBridge

Build Status Downloads this Month Latest stable, (*1)

This package helps you quickly build a Slim Framework application, utilizing the power of Nette DI container., (*2)

THIS PACKAGE IS NO LONGER MAINTAINED!

As suggested in #6, you can use slimapi/slimapi instead., (*3)

Installation and requirements

$ composer require oops/slim-nette-bridge

Oops/SlimNetteBridge requires PHP >= 7.1., (*4)

Usage

Register the extension in your config file., (*5)

extensions:
    slim: Oops\SlimNetteBridge\DI\SlimExtension(%debugMode%)

Then configure it:, (*6)

slim:
    settings:
        addContentLengthHeader: false
    configurators:
        - App\MyConfigurator
  • settings section can be used to override Slim's default settings;
  • configurators is a list of ApplicationConfigurator implementations which, in the same order as defined in the list, can add routes and middlewares to the instance of Slim\App.

Once you have configured the bridge, you can create a simple index.php script in your document root, using nette/bootstrap to build the container:, (*7)

<?php

// include Composer autoloader
require_once __DIR__ . '/path/to/vendor/autoload.php';

// configure and create the DI container
$configurator = new Nette\Configurator();
$configurator->setTempDirectory(__DIR__ . '/path/to/temp');
$configurator->addConfig(__DIR__ . '/path/to/config.neon');
$container = $configurator->createContainer();

// run the configured Slim application
$container->getByType(Slim\App::class)->run();

Don't forget to configure your web server to pass the incoming requests to the index.php script., (*8)

The Versions

30/11 2017

dev-master

9999999-dev

Slim Framework bridge for Nette DI.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

slim nette di

30/11 2017

1.1.0

1.1.0.0

Slim Framework bridge for Nette DI.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

slim nette di

20/09 2017