Joomla\DI\Container::protect
Convenience method for creating protected keys.
Signature
Parameters
-
$key
- Name of dataStore key to set.
-
$callback
- Callable function to run when requesting the specified $key.
-
$shared
- True to create and store a shared instance.
Returns
- Container
- This instance to support chaining.