-
-
Notifications
You must be signed in to change notification settings - Fork 2
Constructing the Input class
Greg Bowler edited this page Jan 25, 2024
·
7 revisions
The Input class is the main entrypoint to the functionality of this library. It is a representation of the $_GET, $_POST, and $_FILES superglobals, and the php://input stream.
Construct the class as follows (the 4th parameter is optional, defaulting to "php://input"):
use Gt\Input\Input;
$input = new Input($_GET, $_POST, $_FILES);All functionality can be accessed from a constructed Input class.
WebEngine automatically instantiates the Input class and stores it in the Service Container.
// TODO: WebEngine automatically instantiates the Input class - ready for use in the go/do functions; how to construct the Input class manually.
PHP.GT/Input is a separately maintained component of PHP.GT/WebEngine.