From: Matthew M. <ma...@tu...> - 2003-10-17 12:29:32
|
Steven can answer this better than I can, but I imagine it will work like 0.9.4. There are four files in 0.9.4 (probably less in Steven's revision of 0.9.3) init.php : This file is called BEFORE the session_start is called. If you have classes that need including, this is where to do it. runtime.php : Not required but needed if your module needs to be called every time a page is called. For example, users uses runtime to print your login box. index.php : This file is called only when your module specifically accessed. We separated them out so because frequently there is a lot of logic in the index file and it tends to get big. If you only need a quick command to run, it saves time. Plus (in 0.9.4) you can focus index.php on only what needs to be done for that module. close.php : Like init, I don't think Steven is using this. In 0.9.4 this file is called for each module to tie up loose ends. In 0.9.4 layout, close calls the function to display the theme. Others may use it to close sessions or other properties. Again, I think Steven is only using runtime and index but this is the direction we are going. Matt On Fri, 2003-10-17 at 01:15, Eloi George wrote: > Steven Levin wrote: > > >Well it was not just the PHPWS_Text class, all the core classes have > >been seperated. The runtime.php file runs instead of the index.php file > >when the module is not called. Both would be included if the module was > >called. The core is now setup to only include the module that is > >currently being requested. The runtime.php file allows for modules not > >running to still show content. I had not set it up do be authorized by > >allow_view, but I will, just forgot about it. > > > > > > > > I'm still having trouble understanding why we'd need a runtime.php in > addition to the index.php. Either way a file will still get called up. > In certain of my modules, the index.php code contains some if-else > statements that check $GLOBALS['module'] to see which module has > dominance and act accordingly. How does offloading that code to a > different file give us performance benefits? Is it just that both would > end up being smaller files? > > After 16 hours of sleep, I'm feeling so much better... > > Eloi > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > SourceForge.net hosts over 70,000 Open Source Projects. > See the people who have HELPED US provide better services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |