EXPLANATION Each MVC framework comes with a request object. Modern frameworks should share a common request object as it has been defined in PSR-7 compatible one. This request object can be used to access GET and POST parameters.
You should use it instead of accessing $_GET, $_POST or $_REQUEST directly.
This has several advantages:
* you can unit-test your methods more easily since they do not rely on globals * your framework can enrich the request, apply filters or middleware on it * you can easily fake a request or modify a request * your code is more predictable since only controllers are allowed to use that request object (see next rule) 0005仕様書無しさん2022/02/04(金) 19:39:21.81>>4