Septum A site templating engine Source Code Main file |
Main fileThis is the implementation of Septum. Summary
OPTION_CACHE_DOCUMENTSpecifies whether or not to use document caching. Since most pages are static, this could greatly improve performance on your server. Make sure there is a subdirectory called /cache in that path, or it will not work. This uses the PEAR’s Cache_Lite object, but the file is included in Septum in case you do not have it installed on the server. fnParseTokens
Parses the tokens section of a file. Parameters
ReturnsAn array containing the tokens to be passed to fnReplaceTokens (in the form ($array[TOKEN] = TEXT]) or NULL if $strFile is empty. fnReplaceTokens
Replaces tokens in $strFile with the text specified in $arrTokens. Parameters
ReturnsA string containing the replaced page. fnReplaceParameters
Replaces a token with its value taking into account that it may contain other tokens within it. Parameters
ReturnsAn array of a string containing the replaced text and a number containing the number of replacements made. |
The main function.
function fnMain()
Returns a file through the method specified (file, MySQL page, etc).
function fnGetFile( $strPage, $intMethod )
Returns the tokens section of a file.
function fnGetTokens( $strFile )
Returns the page section of a file.
function fnGetPage( $strFile )
Parses the tokens section of a file.
function fnParseTokens( $strFile )
Replaces tokens in $strFile with the text specified in $arrTokens.
function fnReplaceTokens( $strFile, $arrTokens )
Replaces a token with its value taking into account that it may contain other tokens within it.
function fnReplaceParameters( $strToken, $strValue, $strText )
Replaces a complex token with its value.
function fnExpandComplexToken( $strToken, $strValue )