-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add support for nested presenters #10
Conversation
I've updated this with a better implementation. I'll look at adding tests tomorrow. |
Now we have the problem of the copy pasted method, which I knew was going to happen. My current thinking is make your new one here static and call it in the view area and delete the one there. |
Provides better error messages on test failure.
Updated to remove code duplication and added tests. I also updated the tests to use |
The modification of alexwhiteman is working great. Can you please accept his pull request ? |
This will be pull requested when I have time to think about the static method we have in there now (trying to think of a better solution, possibly a helpers.php file with it as a function). And when I have time to run the tests myself and then do all the updating for a release with the readme and tag stuff. So it will be pulled in, just not until I am free from work a bit, being smashed right now. |
Ok, sounds good to me ! And thanks for this package that really helps to keep the models light and clean ! |
Does this mean that if User has a Profile, and Profile has a presenter attribute of say transformed, then $user->profile->transformed will work (whereas at the moment, only $profile->transformed does)? If so, that would be great, as at the moment I'm still have to suck it up with accessors as most of my models are heavy related. |
@harhoo Yep, that's exactly what it does. |
This has been merged into the develop branch. |
Allows for nested PresentableInterface instances.