Re: Model data array: how to examine which model it comes from?

2010-11-19 Thread Joshua Muheim
> One other thing: Questions of passing a model to the view aside, > models should be agnostic with respect to access control and > authentication. That's a good point. I'm currently fine-tuning my solution and will release it as a component. Let's see if it will be liked. :-) Check out the new C

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread cricket
On Thu, Nov 18, 2010 at 1:17 PM, Joshua Muheim wrote: > Thanks for your opinion, cricket. > > I just really like my approach because everything that has to do with > permissions is handled at one single point. I'm only working on a > small company-internal application, so I prefer handiness over >

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread Joshua Muheim
Thanks for your opinion, cricket. I just really like my approach because everything that has to do with permissions is handled at one single point. I'm only working on a small company-internal application, so I prefer handiness over performance stuff. I haven't too much experience with my solution

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread cricket
On Thu, Nov 18, 2010 at 11:15 AM, Joshua Muheim wrote: > Yes you're right, jeremy, I made this example up (my real User model > doesn't have an Address, I just added this to show that there are > cases where there's more than one key that isn't another array > itself). > > The reason why I'd like

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread Joshua Muheim
Yes you're right, jeremy, I made this example up (my real User model doesn't have an Address, I just added this to show that there are cases where there's more than one key that isn't another array itself). The reason why I'd like to know this is the following. I have implemented a simple ACL com

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread Jeremy Burns | Class Outfit
Interesting question: why do you need to know? The User key contains user data, the Address key contains address data, and the two are related...no? I think your example array is missing some elements as there would normally be a user_id key in the Address section...I think. Jeremy Burns Class

Model data array: how to examine which model it comes from?

2010-11-18 Thread psybear83
Hi everybody I have a User model which when loaded results in something like the following array: Array ( [User] => Array ( [id] => 3 [name] => posts_editor [password] => 9fb00060ce49a5d5fab91b350b1529fda941a1de [superuser] => 0