View Object PHP5 |
[eluser]esra[/eluser]
Impressive... don't use that word very often. Will experiment with this tonight.
[eluser]wiredesignz[/eluser]
Thanks esra, feedback is appreciated. @nmweb, I will add __set() & __get() and submit this to the wiki after testing. Thanks.
[eluser]Armorfist[/eluser]
Nice work! I'll give it a try later tomorrow, this looks really great. Thanks
[eluser]wiredesignz[/eluser]
Thanks Armorfist. Added __get() & __set() as per suggestion, but this appeared to create severe slowdown issues on my production server, I have commented both methods out for now. Use them at your own discretion until I find the cause. Thanks for the idea nmweb
[eluser]wiredesignz[/eluser]
Don't panic, it seems there was a DNS issue with my host at the exact time I uploaded the new library. Dontcha just hate it when that happens :lol:
[eluser]nmweb[/eluser]
__get and __set do create a slowdown when you use them, magic methods are just slower in general. Therefore I always choose to make them optional by mapping them to a publicly available method. It makes the syntax often a lot more intuitive. Anyway, thanks for adding it in
[eluser]wiredesignz[/eluser]
Update: Added $data array() to View Object constructor to allow template and data to be passed at instantiation. Code: $view = new View('master_layout_file', $data); Also added View Object PHP5 to the wiki: http://codeigniter.com/wiki/View_Object_PHP5/
[eluser]wiredesignz[/eluser]
Update: Code cleaned up a bit. View Object version 3.0.5 is available on the wiki also.
[eluser]sl3dg3hamm3r[/eluser]
hey there I apologize in advance for this 'noobish' question, but could you shortly explain how the master template file 'master_layout_file' would look like? I don't get how e.g. the header will be replaced in the master template. I searched through the CI-wiki for your project, hoping for detailed explanation. Unfortunately, I couldn't find anything As for me, I had now a master-view (well, 'till now it is my first CI-project), in where I would load the regions (header, footer, main-content etc). I guess your aim of this class is to get a better handle of dealing with different regions, right? Sincerely sl3dg3 |
Welcome Guest, Not a member yet? Register Sign In |