Object arguments #5
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
slendium/framework#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently only a limited set of scalar arguments to HTTP resources are supported: strings, ints, floats and bools. Anything else requires creating a custom "extractor."
It should be possible to use custom classes as parameter type to the
#[Method]annotated functions of HTTP resources. Similar to dependency injection, the constructor arguments of new instances of these object arguments will be (recursively) populated according to the constructor definition using reflection.One major difference with DI is that the object arguments may not be lazily instantiated, as incorrect HTTP arguments may indicate a security issue.