Skip to content

Conversation

@alexwhitman
Copy link
Contributor

Allows for nested PresentableInterface instances.

@alexwhitman
Copy link
Contributor Author

I've updated this with a better implementation. I'll look at adding tests tomorrow.

@robclancy
Copy link
Owner

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.

@alexwhitman
Copy link
Contributor Author

Updated to remove code duplication and added tests. I also updated the tests to use assertInstanceOf as it provides a more useful error message rather than just "Failed asserting that false is true.".

@BigfootPlatform
Copy link

The modification of alexwhiteman is working great. Can you please accept his pull request ?

@robclancy
Copy link
Owner

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.

@BigfootPlatform
Copy link

Ok, sounds good to me !

And thanks for this package that really helps to keep the models light and clean !

@harhoo
Copy link

harhoo commented Aug 13, 2013

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.

@alexwhitman
Copy link
Contributor Author

@harhoo Yep, that's exactly what it does.

@robclancy
Copy link
Owner

This has been merged into the develop branch.

@robclancy robclancy closed this Aug 13, 2013
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.

4 participants