[phpwebapp-improvments] [phpwebapp - phpWebApp Improvements] Conditional File Include
Brought to you by:
dashohoxha
From: SourceForge.net <no...@so...> - 2003-08-05 13:13:50
|
Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=2136546 By: dashohoxha Sometimes, small WebBox-es with a single line, like this: <WebBox ID="box_id"> <Include SRC="{{./}}{{file}}" /> </WebBox> are used to include a file according to some condition. Maybe it is better to use another more specific syntax, like this: <FileSwitch ID="switch_id" FILE="{{...}}" /> In this case, the file 'switch_id.php' will contain the PHP code that will actually decide which file is going to be included (according to the state of the application). It will be something like this: <?php class switch_id extends FileSwitch { function init() { . . . } function switch() { . . . } } ?> where FileSwitch extends WebObject (so it may have state variables) and the function switch() is called during the parse (similar to function onParse() of the WebObject). ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=135220 |