Skip to content

Commit

Permalink
Add suggested changes
Browse files Browse the repository at this point in the history
Signed-off-by: tux-rampage <tuxrampage@gmail.com>
  • Loading branch information
tux-rampage committed Oct 12, 2020
1 parent 6b12801 commit 2f259a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/book/v2/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ This quick start is intended to get developers familiar with the concepts of the
laminas-di DiC. Generally speaking, code is never as simple as it is inside this
example, so working knowledge of the other sections of the manual is suggested.

## Example Application

Assume, for a moment, the following application code. It already assumes that
dependencies are injected, and so becomes a good candiate for a DiC.

Expand Down Expand Up @@ -66,6 +68,8 @@ movies, not only can this become repetitive and boring to write, but also
unmaintainable if you want to swap out one of these dependencies on a wholesale
scale.

## Using a laminas-di Container

Since this example of code already practices good dependency injection using
constructor injection, it is a great candidate for using laminas-di.

Expand Down Expand Up @@ -115,6 +119,8 @@ in the methods as the class parameter names. This is how both the `username` and
`password` keys are mapped to the first and second parameters, respectively, of
the constructor consuming these named parameters.

## Passing Parameters on Call Time

If you were to want to pass in the username and password at call time, this is
achieved by passing them as the second argument to `get()`:

Expand Down
12 changes: 6 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ nav:
- Introduction: intro.md
- Installation: installation.md
- "Quick Start": quick-start.md
- Reference:
- "PSR-11 Support": psr-11.md
- Configuration: config.md
- "Injector": injector.md
- "Code Generator": codegen.md
- "PSR-11 Support": psr-11.md
- Configuration: config.md
- "Injector": injector.md
- "Code Generator": codegen.md
- Cookbook:
- "Usage with PSR-11 Containers": cookbook/use-with-psr-containers.md
- "Usage with laminas-servicemanager": cookbook/use-with-servicemanager.md
- "Using AoT with Mezzio and laminas-servicemanager": cookbook/aot-guide.md
- "Migration Guide": migration.md
- Migration:
- "Migration from Version 2 to 3": migration.md
- v2:
- "Quick Start": v2/quick-start.md
- Reference:
Expand Down

0 comments on commit 2f259a3

Please sign in to comment.