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

[2.0.x] Mvc/Model: Setter fallback #10391

Closed

Conversation

brainformatik
Copy link
Contributor

Add setter fallback in "__set" magic.
This is useful if you use protected (private) properties and assign a value directly to a property.
If this property has setter/getter functions they will be called preferably.

@sergeyklay
Copy link
Contributor

@brainformatik Can you please provide a small test?

In any case 👍

@Green-Cat
Copy link
Contributor

👍

@brainformatik
Copy link
Contributor Author

Added a few tests

@sergeyklay
Copy link
Contributor

Fine! 👍

@Surt
Copy link
Contributor

Surt commented Jun 19, 2015

I would like to see this one in Collection too. By the way I would like to see some "entity" behaviours interfaces in both, collections and models. As well a ResultSet kind of data for both, Models resultsets and ODM multiple results.

And, it would be really great to have magic getters too. For example, a toArray call will use the getters if they are defined and returns the value according to object domain logic. #2027

@luiz-brandao
Copy link

What's the status on this?

@luiz-brandao
Copy link

Similar issue: #3033

@sergeyklay
Copy link
Contributor

@brainformatik Can you please rebase onto 2.0.x branch and amend CHANGELOG.md?

@bmoore
Copy link
Contributor

bmoore commented Feb 16, 2016

This will conflict with #11320 if we try to bring #11320 to 2.0.x

@bmoore
Copy link
Contributor

bmoore commented Feb 17, 2016

#11417 Is the ported code from #11320 for 2.0.x

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

Successfully merging this pull request may close these issues.

7 participants