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

RFC: What about introduce «typed» collections? #956

Closed
SCIF opened this issue Jun 28, 2015 · 2 comments
Closed

RFC: What about introduce «typed» collections? #956

SCIF opened this issue Jun 28, 2015 · 2 comments

Comments

@SCIF
Copy link
Contributor

SCIF commented Jun 28, 2015

Inspired by @Big-Shark idea. We can generate stub collections for each model on «model:build» action.

class BookCollection extends ObjectCollection {}

It will allow to replace ChildArticle[]|ObjectCollection with BookCollection from phpdoc of find*() methods. Also, it will allow to restrict returned type if you will use php7 (in user defined functions/methods and in generated Base models).

@SCIF SCIF changed the title «Typed» collections What about introduce «typed» collections? Jun 28, 2015
@SCIF SCIF changed the title What about introduce «typed» collections? RFC: What about introduce «typed» collections? Jun 28, 2015
@staabm
Copy link
Member

staabm commented Jun 28, 2015

I think we discussed this in the past (there should be an issue somwhere in the tracker).

I like the idea.

@SCIF
Copy link
Contributor Author

SCIF commented Jun 28, 2015

Oh. Sorry, didn't search before create.

Duplicate #266.

@SCIF SCIF closed this as completed Jun 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants