From 0833a0b2c17f7445bbc202363e73a4dcb07583cf Mon Sep 17 00:00:00 2001 From: David Grudl Date: Thu, 16 May 2024 23:26:10 +0200 Subject: [PATCH] readme: added jumbo --- readme.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 24d81e254..97f74641d 100644 --- a/readme.md +++ b/readme.md @@ -1,5 +1,4 @@ -Nette Dependency Injection (DI) -=============================== +[![Nette Dependency Injection](https://github.com/nette/di/assets/194960/d368a458-bac1-48b1-9b4b-7929f4bb2f98)](https://doc.nette.org/dependency-injection) [![Downloads this Month](https://img.shields.io/packagist/dm/nette/di.svg)](https://packagist.org/packages/nette/di) [![Tests](https://github.com/nette/di/workflows/Tests/badge.svg?branch=master)](https://github.com/nette/di/actions) @@ -7,6 +6,7 @@ Nette Dependency Injection (DI) [![Latest Stable Version](https://poser.pugx.org/nette/di/v/stable)](https://github.com/nette/di/releases) [![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/di/blob/master/license.md) +  Introduction ------------ @@ -17,6 +17,7 @@ Nette DI is one of the most interesting part of framework. It is compiled DI con Documentation can be found on the [website](https://doc.nette.org/dependency-injection). +  [Support Me](https://github.com/sponsors/dg) -------------------------------------------- @@ -27,6 +28,7 @@ Do you like Nette DI? Are you looking forward to the new features? Thank you! +  Installation ------------ @@ -39,6 +41,7 @@ composer require nette/di It requires PHP version 8.1 and supports PHP up to 8.3. +  Usage ----- @@ -177,6 +180,8 @@ $manager->distribute(...); Significant to Dependency Injection is that no class depends on the container. Thus it can be easily replaced with another one. For example with the container generated by Nette DI. +  + Nette DI ---------- @@ -218,6 +223,7 @@ During development it is useful to activate auto-refresh mode which automaticall $loader = new Nette\DI\ContainerLoader(__DIR__ . '/temp', autoRebuild: true); ``` +  Services -------- @@ -291,6 +297,7 @@ class FooClass However, this method is not ideal, because the variable must be declared as public and there is no way how you can ensure that the passed object will be of the given type. We also lose the ability to handle the assigned dependency in our code and we violate the principles of encapsulation. +  Factories ---------