Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
helpers.php File Reference

Functions

 app ($entryId=null, $parameters=[])
 

Function Documentation

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); ```

Parameters
string | null$entryIdentry name or a class name
array$parametersOptional 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.
Returns
ContainerInterface|mixed either the DI container or the entry associated to the $entryId