Search the Community
Showing results for tags 'oophp'.
-
Hello all advanced users (Ryan, Antti, ?) Introduction: I am curious about how the template files get included, called, how they are run and such. Last week or so, I tried to create little MVC (or rather, V(C+M) ) directory skeleton, where templates itself would be classes generating data for 'views', which would be located in one of the directories in '/site/templates/'. However, when I set up Base class, set few of my templates to use this, added View object (which in theory loads file and dumps data in it), prepared some place for common functions, and prepared autorendering in snippets (creating renderXyz function would give the template object variable called $Xyz with generated object/array of objects). However, upon doing all of this, system felt really slow-ish, having generation time 0,5s-1s for localhost and simple, 3 or 4 field pages, which felt really unnatural - and I suspect my noobish object model So this brings me to my question: I noticed that there are TemplateFile objects, with render() function, and such, whole ProcessWire is 100% OOPhp, is there any recommended way I can use ProcessWire as any MVC framework, having autoloading, so I don't have to use require(); with objects for instance? If this doesn't make any sense for you, I'll try rephrase later, but I hope it does make sense.