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.
Abstract
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.
Table of Contents
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":
The file lib/laymansys.php
sets the include path and includes the necessary modules, that are currently error.php
, RDFParser.php
, LayoutParser.php
, header.php
, frame.php
, footer.php
and config.php
, all located in the lib/laymansys/
directory. It contains the "main" function LayManSysHeader
that coordinates the complete LayManSys processing:
LayManSysHeader
by merging the LayManSysDefaultHeaderOptions
from config.php
with the $options
array passed as argument to LayManSysHeader
.
LayManSysDefaultHeaderOptions
internally calls getRDFFile
.handle1stStageError
.lib/laymansys/RDFParser.php
) and parses the global etc/laymansys.rdf
.parseFile
used for the option value my.rdf
), so the RDF parser contains now the complete metadata of the web document.LayoutParser
is 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.writeHeader
(in lib/laymansys/header.php
):
meta
tag) are written as a whole.<head>
and optionally writing the documents main heading.errHandler
, which is handle2ndStageError
by default. The reason is that the HTTP and HTML header has been written, so we could print out error messages safely.printNavigation
in lib/laymansys/frame.php
), where one of the following actions is executed:
readfile
.getNavigation
is called.The LayManSys finalization routine (that has to be called explicitly) writeFooter
can be found in lib/laymansys/footer.php
. This function writes
address
tag containing the copyright statement (as set by the dc:Rights
tag in either the global etc/laymansys.rdf
or the documents RDF file