<?xml version="1.0"?><phpdoc><class name="IntegratedTemplateExtension" extends="IntegratedTemplate" undoc="false" access="public"><file>c:/www/apache/doc2//form/ITX.php</file><doc><author email="uw@netuse.de">Ulf Wendel</author><inherited src="Array"/><overriden src="Array"/><description>With this class you get the full power of the phplib template class.You may have one file with blocks in it but you have as well one main fileand multiple files one for each block. This is quite usefull when you haveuser configurable websites. Using blocks not in the main template allowsyou to some parts of your layout easily.Note that you can replace an existing block and add new blocks add runtime.Adding new blocks means changing a variable placeholder to a block.</description><shortdescription>Integrated Template Extension - ITX</shortdescription><version>$Id: ITX.php,v 1.4 2001/01/24 11:19:28 sbergmann Exp $</version></doc><function name="IntegratedTemplateExtension" undoc="false" access="public"><doc><parameter name="$root" type="string" undoc="true"/><return type="void"/><description>Make sure that you call this constructor if you derive you owntemplate class from this one.</description><shortdescription>Builds some complex regexps and calls the constructor of the parent class.</shortdescription></doc></function><function name="replaceBlock" undoc="false" access="public"><doc><see type="function">replaceBlockfile()</see><see type="function">addBlock()</see><see type="function">addBlockfile()</see><parameter name="$block" type="string"/><parameter name="$template" type="string"/><return name="" type="boolean"/><description>The Replacement does not affect previously added variables. All data is cached.In case the new block does contain less or other variable placeholder the previouslypassed data that is no longer referenced will be deleted. The internal listof allowed variables gets updated as well.In case the original block contains other blocks it must eighter have placeholderfor the inner blocks or contain them. If you want to use placeholder the placeholder mustlook like openingDelimiter.&amp;quot;__&amp;quot;.blockname.&amp;quot;__&amp;quot;.closingDelimiter .Due to the cache updates replaceBlock() and replaceBlockfile() are &amp;quot;expensive&amp;quot; operationswhich means extensive usage will slow down your script. So try to avoid them and ifyou can&amp;apos;t do so try to use them before you pass lots of variables to the block you&amp;apos;rereplacing.</description><shortdescription>Replaces an existing block with new content. Warning: not implemented yet.</shortdescription></doc></function><function name="replaceBlockfile" undoc="false" access="private"><doc><see type="function">replaceBlockfile()</see><see type="function">addBlock()</see><see type="function">addBlockfile()</see><parameter name="$block" type="string"/><parameter name="$filename" type="string">of the file that contains the blockcontent</parameter><return type="void"/><description>The Replacement does not affect previously added variables. All data is cached.In case the new block does contain less or other variable placeholder the previouslypassed data that is no longer referenced will be deleted. The internal listof allowed variables gets updated as well.In case the original block contains other blocks it must eighter have placeholderfor the inner blocks or contain them. If you want to use placeholder the placeholder mustlook like openingDelimiter.&amp;quot;__&amp;quot;.blockname.&amp;quot;__&amp;quot;.closingDelimiter .Due to the cache updates replaceBlock() and replaceBlockfile() are &amp;quot;expensive&amp;quot; operationswhich means extensive usage will slow down your script. So try to avoid them and ifyou can&amp;apos;t do so try to use them before you pass lots of variables to the block you&amp;apos;rereplacing.</description><shortdescription>Replaces an existing block with new content from a file. Warning: not implemented yet.</shortdescription><brother>replaceblock</brother></doc></function><function name="addBlock" undoc="false" access="public"><doc><see type="function">addBlockfile()</see><parameter name="$placeholder" type="string">of the variable placeholder, the name must be unique within the template.</parameter><parameter name="$blockname" type="string">of the block to be added</parameter><parameter name="$template" type="string">of the block</parameter><return name="" type="boolean"/><description>Add means &amp;quot;replace a variable placeholder by a new block&amp;quot;.This is different to PHPLibs templates. The function loads ablock, creates a handle for it and assigns it to a certainvariable placeholder. To to the same with PHPLibs templates you wouldcall set_file() to create the handle and parse() to assign theparsed block to a variable. By this PHPLibs templates assume that you tendto assign a block to more than one one placeholder. To assign a parsed blockto more than only the placeholder you specify in this function you haveto use a combination of getBlock() and setVariable().As no updates to cached data is necessary addBlock() and addBlockfile()are rather &amp;quot;cheap&amp;quot; meaning quick operations.The block content must not start with &amp;lt;!-- BEGIN blockname --&amp;gt; and end with&amp;lt;!-- END blockname --&amp;gt; this would cause overhead and produce an error.</description><shortdescription>Adds a block to the template changing a variable placeholder to a block placeholder.</shortdescription></doc></function><function name="addBlockfile" undoc="false" access="private"><doc><see type="function">addBlockfile()</see><parameter name="$placeholder" type="string">of the variable placeholder to be converted</parameter><parameter name="$blockname" type="string">of the block to be added</parameter><parameter name="$filename" type="string">that contains the block</parameter><return type="void"/><description>Add means &amp;quot;replace a variable placeholder by a new block&amp;quot;.This is different to PHPLibs templates. The function loads ablock, creates a handle for it and assigns it to a certainvariable placeholder. To to the same with PHPLibs templates you wouldcall set_file() to create the handle and parse() to assign theparsed block to a variable. By this PHPLibs templates assume that you tendto assign a block to more than one one placeholder. To assign a parsed blockto more than only the placeholder you specify in this function you haveto use a combination of getBlock() and setVariable().As no updates to cached data is necessary addBlock() and addBlockfile()are rather &amp;quot;cheap&amp;quot; meaning quick operations.The block content must not start with &amp;lt;!-- BEGIN blockname --&amp;gt; and end with&amp;lt;!-- END blockname --&amp;gt; this would cause overhead and produce an error.</description><shortdescription>Adds a block taken from a file to the template changing a variable placeholder to a block placeholder.</shortdescription><brother>addblock</brother></doc></function><function name="placeholderExists" undoc="false" access="public"><doc><parameter name="$placeholder" type="string">of the placeholder you&amp;apos;re searching</parameter><parameter name="$block" default="&amp;quot;&amp;quot;" type="string">of the block to scan. If left out (default) all blocks are scanned.</parameter><return name="" type="string">Name of the (first) block that contains the specified placeholder.&#x0a;If the placeholder was not found or an error occured an empty string is returned.</return><description/><shortdescription>Returns the name of the (first) block that contains the specified placeholder.</shortdescription></doc></function><function name="performCallback" undoc="false" access="public"><doc><return type="void"/><description/><shortdescription>Checks the list of function calls in the template and calls their callback function.</shortdescription></doc></function><function name="getFunctioncalls" undoc="false" access="public"><doc><return name="" type="array"/><description/><shortdescription>Returns a list of all function calls in the current template.</shortdescription></doc></function><function name="setFunctioncontent" undoc="false" access="public"><doc><parameter name="$functionID" type="int">ID</parameter><parameter name="$replacement" type="string"/><return type="void"/><description/><shortdescription>Replaces a function call with the given replacement.</shortdescription></doc></function><function name="setCallbackFunction" undoc="false" access="public"><doc><parameter name="$tplfunction" type="string">name in the template</parameter><parameter name="$callbackfunction" type="string">of the callback function</parameter><parameter name="$callbackobject" default="&amp;quot;&amp;quot;" type="string">of the callback object</parameter><return name="" type="boolean">False on failure.</return><description/><shortdescription>Sets a callback function.</shortdescription></doc></function><function name="setCallbackFuntiontable" undoc="false" access="public"><doc><parameter name="$functions" type="array">table - array[templatefunction] = array( &amp;quot;function&amp;quot; =&amp;gt; userfunction, &amp;quot;object&amp;quot; =&amp;gt; userobject )</parameter><return type="void"/><description/><shortdescription>Sets the Callback function lookup table</shortdescription></doc></function><function name="getBlocklist" undoc="false" access="public"><doc><see type="function">blockExists()</see><return name="" type="array"> [blockname =&amp;gt; blockname]</return><description/><shortdescription>Returns a list of blocknames in the template.</shortdescription></doc></function><function name="blockExists" undoc="false" access="public"><doc><see type="function">getBlocklist()</see><parameter name="$blockname" type="string"/><return name="" type="boolean"/><description/><shortdescription>Checks wheter a block exists.</shortdescription></doc></function><function name="getBlockvariables" undoc="false" access="public"><doc><see type="function">BlockvariableExists()</see><parameter name="$block" type="string"/><return name="" type="array"> [varname =&amp;gt; varname]</return><description/><shortdescription>Returns a list of variables of a block.</shortdescription></doc></function><function name="BlockvariableExists" undoc="false" access="public"><doc><see type="function">getBlockvariables()</see><parameter name="$block" type="string"/><parameter name="$variable" type="string"/><return name="" type="boolean"/><description/><shortdescription>Checks wheter a block variable exists.</shortdescription></doc></function><function name="buildFunctionlist" undoc="false" access="private"><doc><return type="void"/><description/><shortdescription>Builds a functionlist from the template.</shortdescription></doc></function><function name="deleteFromBlockvariablelist" undoc="false" access="private"><doc><parameter name="$block" type="string"/><parameter name="$variables" type="mixed">of one variable or array of variables ( array ( name =&amp;gt; true ) ) to be stripped.</parameter><return type="void"/><description/><shortdescription>Deletes one or many variables from the block variable list.</shortdescription></doc></function><function name="updateBlockvariablelist" undoc="false" access="private"><doc><parameter name="$block" type="string"/><return type="void"/><description/><shortdescription>Updates the variable list of a block.</shortdescription></doc></function><function name="findPlaceholderBlocks" undoc="false" access="private"><doc><parameter name="$variable" type="string">placeholder</parameter><return name="$parents" type="array"> parents[0..n] = blockname</return><description/><shortdescription>Returns an array of blocknames where the given variable placeholder is used.</shortdescription></doc></function><function name="warning" undoc="false" access="private"><doc><see type="var">$warn</see><see type="var">$printWarning</see><see type="var">$haltOnWarning</see><parameter name="$message" type="string"/><parameter name="$file" default="&amp;quot;&amp;quot;" type="string">where the warning occured</parameter><parameter name="$line" default="0" type="integer">where the warning occured</parameter><return type="void"/><description/><shortdescription>Handles warnings, saves them to $warn and prints them or calls die() depending on the flags</shortdescription></doc></function><function name="init" undoc="true" access="private"><doc><see type="function">free()</see><return type="void"/><overriden src="IntegratedTemplate"/><description>LoadTemplatefile() and setTemplate() automatically call this functionwhen a new template is given. Don&amp;apos;t use this functionunless you know what you&amp;apos;re doing.</description><shortdescription>Clears all datafields of the object and rebuild the internal blocklist</shortdescription></doc></function><function name="getValue" undoc="true" access="private"><doc><parameter name="$code" undoc="true"/><parameter name="$delimiter" undoc="true"/><return type="void"/></doc></function><variable name="$warn" access="public" type="array">array()<doc><see type="var">$printWarning</see><see type="var">$haltOnWarning</see><see type="function">warning()</see><description/><shortdescription>Array with all warnings.</shortdescription></doc></variable><variable name="$printWarning" access="public" type="boolean">false<doc><see type="var">$haltOnWarning</see><see type="var">$warn</see><see type="function">warning()</see><description/><shortdescription>Print warnings?</shortdescription></doc></variable><variable name="$haltOnWarning" access="public" type="boolean">false<doc><see type="var">$warn</see><see type="var">$printWarning</see><see type="function">warning()</see><description/><shortdescription>Call die() on warning?</shortdescription></doc></variable><variable name="$checkblocknameRegExp" access="private" type="string">&amp;quot;&amp;quot;<doc><description/><shortdescription>RegExp used to test for a valid blockname.</shortdescription></doc></variable><variable name="$functionPrefix" access="private" type="string">&amp;quot;func_&amp;quot;<doc><description/><shortdescription>Functionnameprefix used when searching function calls in the template.</shortdescription></doc></variable><variable name="$functionnameRegExp" access="private" type="string">&amp;quot;[_a-zA-Z]+[A-Za-z_0-9]*&amp;quot;<doc><description/><shortdescription>Functionname RegExp.</shortdescription></doc></variable><variable name="$functionRegExp" access="private" type="string">&amp;quot;&amp;quot;<doc><see type="function">IntegratedTemplateExtension()</see><description>The variable gets set by the constructor.</description><shortdescription>RegExp used to grep function calls in the template.</shortdescription></doc></variable><variable name="$functions" access="private" type="array">array()<doc><description/><shortdescription>List of functions found in the template.</shortdescription></doc></variable><variable name="$callback" access="private" type="array">array()<doc><description/><shortdescription>List of callback functions specified by the user.</shortdescription></doc></variable><inherited src="IntegratedTemplate" type="functions"><element>integratedtemplate</element><element>show</element><element>get</element><element>parse</element><element>parsecurrentblock</element><element>setvariable</element><element>setcurrentblock</element><element>touchblock</element><element>free</element><element>settemplate</element><element>loadtemplatefile</element><element>setroot</element><element>buildblockvariablelist</element><element>getglobalvariables</element><element>findblocks</element><element>getfile</element><element>halt</element></inherited><inherited src="IntegratedTemplate" type="variables"><element>$err</element><element>$printerror</element><element>$haltonerror</element><element>$clearcache</element><element>$openingdelimiter</element><element>$closingdelimiter</element><element>$blocknameregexp</element><element>$variablenameregexp</element><element>$variablesregexp</element><element>$removevariablesregexp</element><element>$removeunknownvariables</element><element>$removeemptyblocks</element><element>$blockregexp</element><element>$currentblock</element><element>$template</element><element>$blocklist</element><element>$blockdata</element><element>$blockvariables</element><element>$blockinner</element><element>$touchedblocks</element><element>$variablecache</element><element>$clearcacheonparse</element><element>$fileroot</element><element>$flagblocktrouble</element><element>$flagglobalparsed</element><element>$flagcachetemplatefile</element><element>$lasttemplatefile</element></inherited><path><parent>IntegratedTemplate</parent></path><baseclass>IntegratedTemplate</baseclass></class></phpdoc>
