Copyright © 2005, 2006 Robert Bienert
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
This chapter shows the order in which LayManSys processes files and calls certain functions. It is thought as a guide for developers that want to include LayManSys into their Content Management Systems or want to port the framework into another programming language.
The first step, using an auto-generated header, is optional, so it is present here at the very beginning. Well, than let us start with the real "magig":
lib/laymansys.php sets the include path and includes the necessary modules, that are currently
config.php, all located in the
lib/laymansys/ directory. It contains the "main" function
LayManSysHeader that coordinates the complete LayManSys processing:
LayManSysHeaderby merging the
$optionsarray passed as argument to
lib/laymansys/RDFParser.php) and parses the global
parseFileused for the option value
my.rdf), so the RDF parser contains now the complete metadata of the web document.
LayoutParseris created (file
lib/laymansys/LayoutParser.php), merges the style information already collected with the information found in the layout configuration file (
mergeStyles) and stores it in the metadata object.
metatag) are written as a whole.
<head>and optionally writing the documents main heading.
errHandler, which is
handle2ndStageErrorby default. The reason is that the HTTP and HTML header has been written, so we could print out error messages safely.
lib/laymansys/frame.php), where one of the following actions is executed:
The LayManSys finalization routine (that has to be called explicitly)
writeFooter can be found in
lib/laymansys/footer.php. This function writes
addresstag containing the copyright statement (as set by the
dc:Rightstag in either the global
etc/laymansys.rdfor the documents RDF file