Skip to content

Commit

Permalink
[ci skip] Add CompileInjector section to README.md
Browse files Browse the repository at this point in the history
#112 (comment)

A new section explaining the usage and benefits of the CompileInjector is added to the README.md file. This new section provides details on how it enhances performance by compiling modules and initializing AirInjector for efficient dependency management and faster execution.
  • Loading branch information
koriym committed May 23, 2024
1 parent aa6805a commit 8cafc48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@

Ray.Compiler compiles Ray.Di bindings into PHP code, providing a performance boost that makes Dependency Injection couldn't be any faster.

## Compile Injector

`CompileInjector` is designed to enhance performance by utilizing `Compiler` to compile modules and initializing `AirInjector` for managing dependencies. This approach ensures efficient dependency management and faster execution.

```php
$injector = new CompileInjector($tmpDir, fn => new CarModule);
$car = $injector->getInstance(CarInterface::class);
Expand Down

0 comments on commit 8cafc48

Please sign in to comment.