-
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
UploadData should be included in the Input's internal data
collection, so that it can be referred to in exactly the same way as query string or request body parameters.
The added benefit of this means that callbacks can be passed dynamic functions that can benefit from the type juggling of PHP.
To achieve this, all parameters (apart from extras passed in to ->call()
) need to be InputDatum
types. An InputDatum is a representation of a single request KVP.
$input->do("update-settings")
->with("username", "password", "profile-photo")
->call("saveSettings");
function saveSettings(string $username, string $password, FileUpload $profilePhoto) {
// Dynamic properties with correct type, juggled by PHP.
}