Hey there,
just purchased the premium video library and working my way through (mostly) the advanced/oop php courses
Thanks a lot, really helpful so far!
I'm coding a tracking system atm, as a side project. To learn OO I've decided to do the system completly OO style using the MVC pattern.
Now after finishing Ben's OO log in turorial, I realized I was really confused with all the different method names and to which object they were assigned.
So I was thinking wouldn't it be great if you could just do $this->methodname everywhere in your code, no matter where...?
I was doing some research on that topic, but wasn't really successful, what I found was mentioned often is a registry type of class...
Now I'm not sure, does a registry do exactly what I described above? Acts like a piggy bank for classes, so objects are loaded into the registry and then you can access all your methods with just one $this prefix?
So it all comes down to two questions for me:
1. Is this what a registry is about?
2. And if not, is it possible to reference all your objects with $this->methodname, instead of creating numerous different handles for each object... or is that kind of a stupid idea?
Thanks a lot!