Stud.IP
5.4
|
Functions | |
app ($entryId=null, $parameters=[]) | |
app | ( | $entryId = null , |
|
$parameters = [] |
|||
) |
This function returns the Dependency Injection container used.
``` $container = app(); ```
You may pass an entry name, a class or interface name to resolve it from the container:
``` $logger = app(LoggerInterface::class); ```
string | null | $entryId | entry name or a class name |
array | $parameters | Optional parameters to use to build the entry. Use this to force specific parameters to specific values. Parameters not defined in this array will be resolved using the container. |