AuthMiddlewarewith the key
loggerhelper can be used to write debug messages to your logs.
loggerfunction with no arguments. This will get you an instance of the PSR3 compliant logger that is bound to the container. By default Lumberjack uses
E_USER_DEPRECATEDerrors are now whitelisted from the Exception Handler so that they aren’t fatal.
middleware()function in your Controller's
hasmethod only checks whether the config item exists, regardless of its value.
app.mySettingto an empty value such as
7.1. So make sure your server can handle this version.
keyfrom the container twice. Each time it is resolved, the container will create a new instance of the
MyClassclass. If we were to modify
$value1in any way, that change would not persist in
$value2. For example:
singletonmethod to tell the container to resolve the same instance if there is one.
redirect()- returns a
back()- returns a
RedirectResponsewhich automatically redirects back to the previous URL
report($exception)- tells the Exception Handler to report an exception. Useful if your theme needs to swallow an exception, but you still want to log the fact that it happened
request()- returns the current
session()- can be used to interact with the session in various ways
Zend\Diactoros\ServerRequest, like so:
ServerRequestclass, making it much easier to work with the request. You can access it like so:
request()helper to access the request from anywhere in your theme: