brotkrueml / typo3-matomo-integration

Matomo integration for TYPO3
https://extensions.typo3.org/extension/matomo_integration
GNU General Public License v2.0
4 stars 4 forks source link

Add PSR-7 request object to PSR-14 events #11

Closed brotkrueml closed 1 year ago

brotkrueml commented 1 year ago

Is your feature request related to a problem? Please describe.

Sometimes it is useful to get a reference to the PSR-7 request object via the provided PSR-14 events, so event listeners can use that instead of using the global variables.

The manual of this extension has some use cases:

Describe the solution you'd like

All event listeners have a new method getRequest() which returns the PSR-7 request object.

Describe alternatives you've considered

Retrieving the global variable $GLOBALS['TYPO3_REQUEST'] or $GLOBALS['TSFE'] which should be avoided.

Acceptance criteria