Commit 45d9113d authored by Jordan Lev's avatar Jordan Lev Committed by GitHub

Clarify documentations around protected closures.

The docs state that "protected closures do not get access to the container", but this is somewhat misleading (it confused me for a quite some time). It's true that protected closures are not passed the container as a function argument, but they can access the container via `use ($app)`.
parent 74a6de7e
......@@ -159,7 +159,7 @@ using the ``protect`` method::
// calling it now
echo $add(2, 3);
Note that protected closures do not get access to the container.
Note that the container is not provided as an argument to protected closures (but you can access it via `use($app)`).
Core services
-------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment