flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.62k stars 409 forks source link

Using Request Object #480

Closed tyfai closed 1 year ago

tyfai commented 1 year ago

Is using the request object mandatory?

At the moment I am using the traditional $_GET, $_POST, $_FILES, and $_SESSION variables.

Everything seems to be working, but should I use Flight::request() instead?

pierresh commented 1 year ago

This is not mandatory but much cleaner to use data from Flight::request(), that is not really good to use super globals directly :)

tyfai commented 1 year ago

Okay, thank you.

I will leave the existing code alone, but going forward I will use Flight::request(). :)