Location: PHPKode > scripts > Xyndravandria Mondraviel > Xyndravandria_Mondraviel-master/Xyndravandria/Mondraviel/admin_media/Documentation/html/index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Xyndravandria Mondraviel: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Xyndravandria Mondraviel
   &#160;<span id="projectnumber">Alpha 0.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Xyndravandria Mondraviel Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Xyndravandria is the name of a collection of projects designed and developed by Mauro Di Girolamo (<a href="#" onclick="location.href='mai'+'lto:'+'mau'+'ro'+'dig'+'ir'+'ola'+'mo'+'@we'+'b.'+'de'; return false;">mauro<span style="display: none;">hide@address.com</span>digi<span style="display: none;">hide@address.com</span>rolam<span style="display: none;">hide@address.com</span>hide@address.com<span style="display: none;">hide@address.com</span>b.de</a>); he is therefore the copyright (c) owner of Xyndravandria itself and all of its projects.</p>
<p>Xyndravandria Mondraviel is released under the terms of the Xyndravandria PHP License (XyndravandriaPHPLicense.txt). You should be given a copy of the Xyndravandria PHP License (XyndravandriaPHPLicense.txt) within the same directory as the README.md; if not, you can get a copy at <a href="http://Xyndravandria.ohost.de/XyndravandriaPHPLicense.txt">http://Xyndravandria.ohost.de/XyndravandriaPHPLicense.txt</a> . There might be a release under a freer license for a later, more stable version.</p>
<p>All projects:</p>
<table class="doxtable">
<tr>
<th>Project </th><th>Language </th><th><p class="starttd">Description </p>
<p class="endtd"></p>
</th></tr>
<tr>
<td>Xyndravandria Averazain<br/>
<a href="http://github.com/MauroDiGirolamo/Xyndravandria_Averazain">http://github.com/MauroDiGirolamo/Xyndravandria_Averazain</a> </td><td>PHP </td><td>Averazain is an Ajax framework supporting also JavaScript disabled clients perfectly - including search engines like Google.  </td></tr>
<tr>
<td>Xyndravandria Dyverath<br/>
<a href="http://github.com/MauroDiGirolamo/Xyndravandria_Dyverath">http://github.com/MauroDiGirolamo/Xyndravandria_Dyverath</a> </td><td>PHP </td><td>Dyverath is a database access wrapper.  </td></tr>
<tr>
<td>Xyndravandria Erozaver<br/>
<a href="http://github.com/MauroDiGirolamo/Xyndravandria_Erozaver">http://github.com/MauroDiGirolamo/Xyndravandria_Erozaver</a> </td><td>PHP </td><td>Erozaver is a class extending the type hinting given by the PHP engine (additional support for basic type hinting and size constraints).  </td></tr>
<tr>
<td>Xyndravandria Mondraviel<br/>
<a href="http://github.com/MauroDiGirolamo/Xyndravandria_Mondraviel">http://github.com/MauroDiGirolamo/Xyndravandria_Mondraviel</a> </td><td>PHP </td><td><p class="starttd">Mondraviel is a class used to separate HTML from PHP code by firstly register models - files containing place holders embedded in HTML code - and then later fill them dynamically with content by passing values for the place holders. </p>
<p class="endtd"></p>
</td></tr>
</table>
<p>In the following, the usage of Mondraviel will be explained roughly; if you would like to know more detailled information, you can take a look at the in-depth documentation by browsing through either the namespaces or the data structures in the navigation above.</p>
<h1><a class="anchor" id="S1"></a>
I. Overview</h1>
<p>Mondraviel is a class used to separate HTML from PHP code by firstly register models - files containing place holders embedded in HTML code - and then later fill them dynamically with content by passing values for the place holders.</p>
<h1><a class="anchor" id="S2"></a>
II. Models</h1>
<p>A model is a file containing place holders embedded in HTML code. Place holders look like PHP variable, so they start with a leading $. <br/>
 You have to use <a class="el" href="class_xyndravandria_1_1_mondraviel_1_1_mondraviel.html#ae6d33e18eb86b63832f713ff78867bcd">Mondraviel::RegisterModel( )</a> to register a model. <br/>
 Please read the documentation of <a class="el" href="class_xyndravandria_1_1_mondraviel_1_1_mondraviel.html#ae6d33e18eb86b63832f713ff78867bcd">Mondraviel::RegisterModel( )</a> for more information.</p>
<h1><a class="anchor" id="S3"></a>
III. Filling a model</h1>
<p>Use <a class="el" href="class_xyndravandria_1_1_mondraviel_1_1_mondraviel.html#a65ab895252a1bf7e3c960508e0b8a899">Mondraviel::FillModel( )</a> to fill a model which has been registered earlier. You will be returned the combined content. <br/>
 Of course, you can fill one and the same model with different values. The model itself will never be changed after it has been registered (unless you change the file used as a model). <br/>
 Furthermore, you do not have to pass values for the place holders if you would just like to have a static HTML file as a model. <br/>
 You should, additionally, read the documentation of <a class="el" href="class_xyndravandria_1_1_mondraviel_1_1_mondraviel.html#a65ab895252a1bf7e3c960508e0b8a899">Mondraviel::FillModel( )</a> for details.</p>
<h1><a class="anchor" id="S4"></a>
IV. Example</h1>
<pre class="fragment">&lt;!--
##################
#   Index.html   #
##################
--&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;

   &lt;head&gt;
      &lt;title&gt;
         $Title
      &lt;/title&gt;
   &lt;/head&gt;

   &lt;body&gt;
      $Body
   &lt;/body&gt;
   
&lt;/html&gt;
</pre><p> <br/>
 </p>
<pre class="fragment">&lt;?php
#################
#   Index.php   #
#################
require_once( 'Xyndravandria/Mondraviel/Implement.php' );
use Xyndravandria\Mondraviel\Mondraviel;

Mondraviel::RegisterModel( 'Index.html' );

$Filling = array( 'Title' =&gt; 'Testing Mondraviel',
                  'Body' =&gt; 'This is a test.' );

echo Mondraviel::FillModel( 'Index', $Filling );
exit;
?&gt;
</pre><p> <br/>
 Output: </p>
<pre class="fragment">&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
       "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;

   &lt;head&gt;
      &lt;title&gt;
         Testing Mondraviel
      &lt;/title&gt;
   &lt;/head&gt;

   &lt;body&gt;
      This is a test.
   &lt;/body&gt;
   
&lt;/html&gt;
</pre> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon May 20 2013 23:36:50 for Xyndravandria Mondraviel by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li>
  </ul>
</div>
</body>
</html>
Return current item: Xyndravandria Mondraviel