classPreview.html 13.4 KB
<!-- HTML header for doxygen 1.8.5-->
<!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.6"/>
<title>Fat-Free Framework: Preview Class Reference</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="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">Fat-Free Framework
   &#160;<span id="projectnumber">3.2.2</span>
   &#160;<span class="menu"><a href="index.html">Overview</a> <a href="annotated.html">Class List</a> <a href="hierarchy.html">Hierarchy</a></span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classPreview-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Preview Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Lightweight template engine.  
 <a href="classPreview.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Preview:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classPreview.png" usemap="#Preview_map" alt=""/>
  <map id="Preview_map" name="Preview_map">
<area href="classView.html" title="View handler. " alt="View" shape="rect" coords="0,56,62,80"/>
<area href="classPrefab.html" title="Factory class for single-instance objects. " alt="Prefab" shape="rect" coords="0,0,62,24"/>
<area href="classTemplate.html" title="XML-style template engine. " alt="Template" shape="rect" coords="0,168,62,192"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac1efc68a32f6586da0de6bd8e5ce9236"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPreview.html#ac1efc68a32f6586da0de6bd8e5ce9236">token</a> ($str)</td></tr>
<tr class="separator:ac1efc68a32f6586da0de6bd8e5ce9236"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6eb272bb3be69a1c63b66fe791bb8b3d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPreview.html#a6eb272bb3be69a1c63b66fe791bb8b3d">resolve</a> ($str, array $hive=NULL)</td></tr>
<tr class="separator:a6eb272bb3be69a1c63b66fe791bb8b3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25a8edf2ccad5d98e7f118fe78072d0c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPreview.html#a25a8edf2ccad5d98e7f118fe78072d0c">render</a> ($file, $mime='text/html', array $hive=NULL, $ttl=0)</td></tr>
<tr class="separator:a25a8edf2ccad5d98e7f118fe78072d0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classView"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classView')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classView.html">View</a></td></tr>
<tr class="memitem:a3f3e380e4794e627e7fe35d1a5fce246 inherit pub_methods_classView"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#a3f3e380e4794e627e7fe35d1a5fce246">esc</a> ($arg)</td></tr>
<tr class="separator:a3f3e380e4794e627e7fe35d1a5fce246 inherit pub_methods_classView"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94f1333c90966ff49ebbcf29a83ca1a5 inherit pub_methods_classView"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#a94f1333c90966ff49ebbcf29a83ca1a5">raw</a> ($arg)</td></tr>
<tr class="separator:a94f1333c90966ff49ebbcf29a83ca1a5 inherit pub_methods_classView"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad927807baa5a97b52e6bde2a4a0c48fa inherit pub_methods_classView"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#ad927807baa5a97b52e6bde2a4a0c48fa">render</a> ($file, $mime='text/html', array $hive=NULL, $ttl=0)</td></tr>
<tr class="separator:ad927807baa5a97b52e6bde2a4a0c48fa inherit pub_methods_classView"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a96cfdbd00dd1e8d7ccaf9e167cc536cf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPreview.html#a96cfdbd00dd1e8d7ccaf9e167cc536cf">build</a> ($node)</td></tr>
<tr class="separator:a96cfdbd00dd1e8d7ccaf9e167cc536cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classView"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classView')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classView.html">View</a></td></tr>
<tr class="memitem:a2bf1b210f2fe7efcc7089579e63b37e6 inherit pro_methods_classView"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#a2bf1b210f2fe7efcc7089579e63b37e6">sandbox</a> (array $hive=NULL)</td></tr>
<tr class="separator:a2bf1b210f2fe7efcc7089579e63b37e6 inherit pro_methods_classView"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:ae010f04277309e1b21b11ddd06c01455"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae010f04277309e1b21b11ddd06c01455"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPreview.html#ae010f04277309e1b21b11ddd06c01455">$mime</a></td></tr>
<tr class="memdesc:ae010f04277309e1b21b11ddd06c01455"><td class="mdescLeft">&#160;</td><td class="mdescRight">MIME type. <br/></td></tr>
<tr class="separator:ae010f04277309e1b21b11ddd06c01455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classView"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classView')"><img src="closed.png" alt="-"/>&#160;Protected Attributes inherited from <a class="el" href="classView.html">View</a></td></tr>
<tr class="memitem:ad4ffe360a4edcdce1cf6abe276f1370f inherit pro_attribs_classView"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4ffe360a4edcdce1cf6abe276f1370f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classView.html#ad4ffe360a4edcdce1cf6abe276f1370f">$view</a></td></tr>
<tr class="memdesc:ad4ffe360a4edcdce1cf6abe276f1370f inherit pro_attribs_classView"><td class="mdescLeft">&#160;</td><td class="mdescRight">Template file. <br/></td></tr>
<tr class="separator:ad4ffe360a4edcdce1cf6abe276f1370f inherit pro_attribs_classView"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classPrefab"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classPrefab')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classPrefab.html">Prefab</a></td></tr>
<tr class="memitem:a459ac539bc012dbdb77abe0d0ebeba76 inherit pub_static_methods_classPrefab"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPrefab.html#a459ac539bc012dbdb77abe0d0ebeba76">instance</a> ()</td></tr>
<tr class="separator:a459ac539bc012dbdb77abe0d0ebeba76 inherit pub_static_methods_classPrefab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Lightweight template engine. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a96cfdbd00dd1e8d7ccaf9e167cc536cf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Preview::build </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$node</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Assemble markup </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$node</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a25a8edf2ccad5d98e7f118fe78072d0c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Preview::render </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$file</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$mime</em> = <code>'text/html'</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array&#160;</td>
          <td class="paramname"><em>$hive</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$ttl</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Render template </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$file</td><td>string </td></tr>
    <tr><td class="paramname">$mime</td><td>string </td></tr>
    <tr><td class="paramname">$hive</td><td>array </td></tr>
    <tr><td class="paramname">$ttl</td><td>int </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6eb272bb3be69a1c63b66fe791bb8b3d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Preview::resolve </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">array&#160;</td>
          <td class="paramname"><em>$hive</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Render template string </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
    <tr><td class="paramname">$hive</td><td>array </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac1efc68a32f6586da0de6bd8e5ce9236"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Preview::token </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$str</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Convert token to variable </p>
<dl class="section return"><dt>Returns</dt><dd>string </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">$str</td><td>string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>base.php</li>
</ul>
</div><!-- contents -->