Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement League/URI for id:elem generation #22

Open
jrushlow opened this issue Jan 13, 2020 · 1 comment
Open

implement League/URI for id:elem generation #22

jrushlow opened this issue Jan 13, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@jrushlow
Copy link
Member

Currently, Entry & Feed constructors set the provided $id param directly to $id properties. On get(), $this-id is checked that it's not an empty string and returned.

In the FeedFactory, the $id param is checked in validateRequiredFeedElements() to ensure its not an empty string.

PR #21 implemented URI/IRI validation for id:elements provides RFC 3986 & 3987 compliance/validation for the $id param (Atom id:element).

It would be better to utilize League/Uri::createFromString() when supplying the $id constructor param in factories to help ensure a model object always contains a valid & compliant $id property.

@jrushlow
Copy link
Member Author

Note to self:
Implement Uri::createFromString() in the Model directly?
Would this be possible without causing the constructor to do work rather than provide params?
Would this restrict the ability for outside libraries using Atom\Models* to utilize their own RFC 3987 RFC 3986 validation? Or enforce the concept upon them that Atom\Models* are always valid objects upon creation?

@jrushlow jrushlow added the enhancement New feature or request label Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant