robclancy / presenter

Decorate your objects using presenters. Primarily to keep presentation logic out of your models.
MIT License
345 stars 38 forks source link

fixed isset problem with parent objects, used magic method __isset() #15

Closed nsbucky closed 11 years ago

nsbucky commented 11 years ago

When using the service provider to automagically create Presenter instances of objects, I found there was a problem with using Form::model(), as it uses isset() to check values on the bound model. Since Presenter is just a wrapper, the values are not set. By implementing the __isset() it keeps the Form::model() working as expected. Hopefully this is an acceptable addition.

robclancy commented 11 years ago

Needs a better comment, just something like "this is called when isset() is called".

Space after the comments like others.

You need to support arrays too. And needs tests.

Otherwise I'll PR it later and make the changes myself, just not much time with this lately.

nsbucky commented 11 years ago

ok thanks

robclancy commented 11 years ago

This has been merged into the develop branch.