Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Conversation

@mathieucarbou
Copy link
Owner

  • request->setAttribute(name, val)
  • request->hasAttribute(name)
  • request->getAttribute(name, defaultValue)

@mathieucarbou
Copy link
Owner Author

mathieucarbou commented Sep 8, 2024

Since request attribute usage is relatively a niche use case, more useful with middleware, I decided to implement it using String as a data holder class. This is not the most efficient way, but since most of the use cases are String values in request attributes I think this is acceptable.

@DRSDavidSoft
Copy link

This is excellent implementation 👍🏻

@mathieucarbou mathieucarbou force-pushed the attributes branch 3 times, most recently from 5ac5fd2 to e7210d5 Compare September 10, 2024 22:20
- request->setAttribute(name, val)
- request->hasAttribute(name)
- request->getAttribute(name, defaultValue)
@mathieucarbou mathieucarbou merged commit 958f764 into main Sep 11, 2024
@mathieucarbou mathieucarbou deleted the attributes branch September 13, 2024 23:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants