orisai/nette-di

Configure your Nette application

1.3.3 2024-06-21 11:51 UTC

This package is auto-updated.

Last update: 2024-06-21 22:30:33 UTC


README

Orisai
Nette DI

Configure your Nette application

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

namespace App;

use OriNette\DI\Boot\Environment;
use OriNette\DI\Boot\ManualConfigurator;

final class Bootstrap
{

	public static function boot(): ManualConfigurator
	{
		$configurator = new ManualConfigurator(dirname(__DIR__));

		$configurator->setDebugMode(
			Environment::isEnvDebug()
			|| Environment::isLocalhost()
		);
		$configurator->enableDebugger();

		$configurator->addConfig(__DIR__ . '/wiring.neon');
		$configurator->addConfig(__DIR__ . '/../config/local.neon');

		return $configurator;
	}

}

... and more.