Location: PHPKode > projects > SithTemplate > SithTemplate-1.1/docs/html/class_template_utils.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"/>
<title>SithTemplate: TemplateUtils Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<h1>TemplateUtils Class Reference</h1>  </div>
</div>
<div class="contents">
<!-- doxytag: class="TemplateUtils" -->
<p>Namespace-acting all-static class.  
<a href="#_details">More...</a></p>

<p><a href="class_template_utils-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#aa3553ef2c1e54e0e99ad38a7fe931efa">escape</a> ($str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Escape string to use in template class.  <a href="#aa3553ef2c1e54e0e99ad38a7fe931efa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#aeadcc7d717f5752474ab611bd45cfd7b">sanitize</a> ($str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sanitize string, for use as function name.  <a href="#aeadcc7d717f5752474ab611bd45cfd7b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a486a01915d89b3a87095461329a3a7e6">strip</a> ($str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Strip newlines and spaces from string.  <a href="#a486a01915d89b3a87095461329a3a7e6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#ad8600ee16ab4bcfc0575696c8e2520d2">split</a> ($separator, $str, $reverse=false)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Split string into two.  <a href="#ad8600ee16ab4bcfc0575696c8e2520d2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a28bd46df8e8547dd387e2047733d8f87">splitEscaped</a> ($delimiter, $expression)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Properly splits given expression using given delimiter.  <a href="#a28bd46df8e8547dd387e2047733d8f87"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a9a1d840a603201d1c3a1cb962b6e4c04">filterEmpty</a> ($x)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a1282a8a4e4a86cd2af8aef16f73434da">doesImplement</a> ($classOrObject, $interface)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether class implements given interface.  <a href="#a1282a8a4e4a86cd2af8aef16f73434da"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#ae8b229fe2fe444ee11efdbb97bf7cfef">splitIODSN</a> (array &amp;$settings, $dsn)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits I/O DSN into driver name and template name.  <a href="#ae8b229fe2fe444ee11efdbb97bf7cfef"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a3c4884dc20fe80e13a23f36f09663220">parseIODSN</a> (array &amp;$settings, $dsn)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits I/O DSN, and creates correct driver object.  <a href="#a3c4884dc20fe80e13a23f36f09663220"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a15d98177df949189c4b094a7f6521329">className</a> ($template)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns class name for given template or DSN.  <a href="#a15d98177df949189c4b094a7f6521329"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a9756a1cc5232e00302a0b52c3a1e8e10">panic</a> ($file, $line)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Panics.  <a href="#a9756a1cc5232e00302a0b52c3a1e8e10"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a9ded2c07232134c25d3cf9300822e7d8">checkIfAllowed</a> ($obj, $type, $name, $node=null)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether element is allowed.  <a href="#a9ded2c07232134c25d3cf9300822e7d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_template_utils.html#a9c4b3a502dd4eb798f4d47deb972ed7c">checkIORestriction</a> ($obj, $setting, $dsn, $expectedDriver, $node=null)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether I/O restriction is in effect.  <a href="#a9c4b3a502dd4eb798f4d47deb972ed7c"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Namespace-acting all-static class. </p>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00012">12</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aa3553ef2c1e54e0e99ad38a7fe931efa"></a><!-- doxytag: member="TemplateUtils::escape" ref="aa3553ef2c1e54e0e99ad38a7fe931efa" args="($str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::escape </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>str</em>&#160;)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Escape string to use in template class. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$str</td><td>String </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Escaped string </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00019">19</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01352">TemplateStdLibExPlugin::handleTInclude()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00528">TemplateCompilerEx::parseFilterChain()</a>, and <a class="el" href="_compiler_ex_8php_source.html#l00423">TemplateCompilerEx::parseVariableExpression()</a>.</p>

</div>
</div>
<a class="anchor" id="aeadcc7d717f5752474ab611bd45cfd7b"></a><!-- doxytag: member="TemplateUtils::sanitize" ref="aeadcc7d717f5752474ab611bd45cfd7b" args="($str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::sanitize </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>str</em>&#160;)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sanitize string, for use as function name. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$str</td><td>String </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Sanitized string </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00035">35</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, and <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01120">TemplateStdLibExPlugin::handleTIfChanged()</a>.</p>

</div>
</div>
<a class="anchor" id="a486a01915d89b3a87095461329a3a7e6"></a><!-- doxytag: member="TemplateUtils::strip" ref="a486a01915d89b3a87095461329a3a7e6" args="($str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::strip </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>str</em>&#160;)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Strip newlines and spaces from string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$str</td><td>String </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Stripped string </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00045">45</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00580">TemplateCompilerEx::commonVerifyElement()</a>, and <a class="el" href="_compiler_ex_8php_source.html#l00756">TemplateCompilerEx::runHooks()</a>.</p>

</div>
</div>
<a class="anchor" id="ad8600ee16ab4bcfc0575696c8e2520d2"></a><!-- doxytag: member="TemplateUtils::split" ref="ad8600ee16ab4bcfc0575696c8e2520d2" args="($separator, $str, $reverse=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::split </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>separator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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">$&#160;</td>
          <td class="paramname"> <em>reverse</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Split string into two. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$separator</td><td>Separator </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$str</td><td>String to split </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$reverse</td><td>Use reversed search </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Array </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00057">57</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01321">TemplateStdLibExPlugin::commonIfEqual()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00975">TemplateStdLibExPlugin::handleTFor()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01369">TemplateStdLibExPlugin::handleTNow()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00528">TemplateCompilerEx::parseFilterChain()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01192">TemplateStdLibExPlugin::parseIfExpression()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00191">TemplateCompilerEx::parserGetNextToken()</a>, and <a class="el" href="_utils_8php_source.html#l00138">splitIODSN()</a>.</p>

</div>
</div>
<a class="anchor" id="a28bd46df8e8547dd387e2047733d8f87"></a><!-- doxytag: member="TemplateUtils::splitEscaped" ref="a28bd46df8e8547dd387e2047733d8f87" args="($delimiter, $expression)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::splitEscaped </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>delimiter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>expression</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Properly splits given expression using given delimiter. </p>
<p>Supports string delimiter escaping (<code>"</code>).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$delimiter</td><td>Delimiter to use </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$expression</td><td>Expression to split </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Split expression </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>Better way? </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00079">79</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00176">panic()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00528">TemplateCompilerEx::parseFilterChain()</a>, and <a class="el" href="_compiler_ex_8php_source.html#l00191">TemplateCompilerEx::parserGetNextToken()</a>.</p>

</div>
</div>
<a class="anchor" id="a9a1d840a603201d1c3a1cb962b6e4c04"></a><!-- doxytag: member="TemplateUtils::filterEmpty" ref="a9a1d840a603201d1c3a1cb962b6e4c04" args="($x)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::filterEmpty </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>x</em>&#160;)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00118">118</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

</div>
</div>
<a class="anchor" id="a1282a8a4e4a86cd2af8aef16f73434da"></a><!-- doxytag: member="TemplateUtils::doesImplement" ref="a1282a8a4e4a86cd2af8aef16f73434da" args="($classOrObject, $interface)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::doesImplement </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>classOrObject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>interface</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check whether class implements given interface. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$classOrObject</td><td>Mixed </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$interface</td><td>String </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Boolean </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00127">127</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>Referenced by <a class="el" href="_plugins_8php_source.html#l00047">TemplatePlugins::load()</a>.</p>

</div>
</div>
<a class="anchor" id="ae8b229fe2fe444ee11efdbb97bf7cfef"></a><!-- doxytag: member="TemplateUtils::splitIODSN" ref="ae8b229fe2fe444ee11efdbb97bf7cfef" args="(array &amp;$settings, $dsn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::splitIODSN </td>
          <td>(</td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>settings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>dsn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Splits I/O DSN into driver name and template name. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$settings</td><td>Settings array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$dsn</td><td>DSN to split </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Array(driver name, template name) </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00138">138</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00057">split()</a>.</p>

<p>Referenced by <a class="el" href="_utils_8php_source.html#l00274">checkIORestriction()</a>, and <a class="el" href="_utils_8php_source.html#l00153">parseIODSN()</a>.</p>

</div>
</div>
<a class="anchor" id="a3c4884dc20fe80e13a23f36f09663220"></a><!-- doxytag: member="TemplateUtils::parseIODSN" ref="a3c4884dc20fe80e13a23f36f09663220" args="(array &amp;$settings, $dsn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::parseIODSN </td>
          <td>(</td>
          <td class="paramtype">array &amp;$&#160;</td>
          <td class="paramname"> <em>settings</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>dsn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Splits I/O DSN, and creates correct driver object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$settings</td><td>Settings array </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$dsn</td><td>DSN to parse </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Array(I/O driver, template name) </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00153">153</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_i_o_8php_source.html#l00029">TemplateIO::get()</a>, and <a class="el" href="_utils_8php_source.html#l00138">splitIODSN()</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00117">TemplateCompilerEx::compile()</a>, and <a class="el" href="_environment_8php_source.html#l00458">TemplateEnviron::include_()</a>.</p>

</div>
</div>
<a class="anchor" id="a15d98177df949189c4b094a7f6521329"></a><!-- doxytag: member="TemplateUtils::className" ref="a15d98177df949189c4b094a7f6521329" args="($template)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::className </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>template</em>&#160;)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns class name for given template or DSN. </p>
<p>Note that only real template name should be used in class name.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$template</td><td>Template name </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Class name </dd></dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00165">165</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_utils_8php_source.html#l00176">panic()</a>.</p>

</div>
</div>
<a class="anchor" id="a9756a1cc5232e00302a0b52c3a1e8e10"></a><!-- doxytag: member="TemplateUtils::panic" ref="a9756a1cc5232e00302a0b52c3a1e8e10" args="($file, $line)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::panic </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>line</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Panics. </p>
<p>Used internally when sanity checks are failing.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$file</td><td>Source filename </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$line</td><td>Source line </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00176">176</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_error_8php_source.html#l00084">TemplateError::E_INTERNAL_CORE_FAILURE</a>.</p>

<p>Referenced by <a class="el" href="_utils_8php_source.html#l00191">checkIfAllowed()</a>, <a class="el" href="_utils_8php_source.html#l00274">checkIORestriction()</a>, <a class="el" href="_utils_8php_source.html#l00165">className()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00580">TemplateCompilerEx::commonVerifyElement()</a>, <a class="el" href="_compiler_ex_8php_source.html#l00729">TemplateCompilerEx::generateUniqueBlock()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00843">TemplateStdLibExPlugin::handleTCycle()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01308">TemplateStdLibExPlugin::handleTElse()</a>, <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l01112">TemplateStdLibExPlugin::handleTEmpty()</a>, and <a class="el" href="_utils_8php_source.html#l00079">splitEscaped()</a>.</p>

</div>
</div>
<a class="anchor" id="a9ded2c07232134c25d3cf9300822e7d8"></a><!-- doxytag: member="TemplateUtils::checkIfAllowed" ref="a9ded2c07232134c25d3cf9300822e7d8" args="($obj, $type, $name, $node=null)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::checkIfAllowed </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>node</em> = <code>null</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks whether element is allowed. </p>
<p>Raises <a class="el" href="class_template_error.html">TemplateError</a> if it's not.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$obj</td><td>Instance of <a class="el" href="class_template_environ.html">TemplateEnviron</a> or <a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$type</td><td>Element type (<code>'plugin'</code>, <code>'tag'</code>, <code>'filter'</code>, <code>'function'</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$name</td><td>Element name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Optional instance of <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00191">191</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_error_8php_source.html#l00079">TemplateError::E_SECURITY_VIOLATION</a>, <a class="el" href="_utils_8php_source.html#l00176">panic()</a>, <a class="el" href="_environment_8php_source.html#l00219">TemplateEnviron::SECURITY_ALLOW_ALL</a>, <a class="el" href="_environment_8php_source.html#l00223">TemplateEnviron::SECURITY_ALLOW_DENY</a>, <a class="el" href="_environment_8php_source.html#l00231">TemplateEnviron::SECURITY_DENY_ALL</a>, <a class="el" href="_environment_8php_source.html#l00227">TemplateEnviron::SECURITY_DENY_ALLOW</a>, and <a class="el" href="_environment_8php_source.html#l00215">TemplateEnviron::SECURITY_DISABLE</a>.</p>

<p>Referenced by <a class="el" href="_compiler_ex_8php_source.html#l00580">TemplateCompilerEx::commonVerifyElement()</a>, and <a class="el" href="_plugins_8php_source.html#l00047">TemplatePlugins::load()</a>.</p>

</div>
</div>
<a class="anchor" id="a9c4b3a502dd4eb798f4d47deb972ed7c"></a><!-- doxytag: member="TemplateUtils::checkIORestriction" ref="a9c4b3a502dd4eb798f4d47deb972ed7c" args="($obj, $setting, $dsn, $expectedDriver, $node=null)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static TemplateUtils::checkIORestriction </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>setting</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>dsn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>expectedDriver</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"> <em>node</em> = <code>null</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Checks whether I/O restriction is in effect. </p>
<p>Raises <a class="el" href="class_template_error.html">TemplateError</a> if setting is active and driver names mismatch.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">$obj</td><td>Instance of <a class="el" href="class_template_environ.html">TemplateEnviron</a> or <a class="el" href="class_template_compiler_ex.html">TemplateCompilerEx</a> </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$setting</td><td>Setting to check (either <code>restrictExtendIO</code> or <code>restrictIncludeIO</code>) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$dsn</td><td>DSN to check </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$expectedDriver</td><td>Expected driver name </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">$node</td><td>Optional instance of <a class="el" href="class_template_node_ex.html">TemplateNodeEx</a> </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_utils_8php_source.html#l00274">274</a> of file <a class="el" href="_utils_8php_source.html">Utils.php</a>.</p>

<p>References <a class="el" href="_error_8php_source.html#l00079">TemplateError::E_SECURITY_VIOLATION</a>, <a class="el" href="_utils_8php_source.html#l00176">panic()</a>, and <a class="el" href="_utils_8php_source.html#l00138">splitIODSN()</a>.</p>

<p>Referenced by <a class="el" href="_std_lib_ex_8plugin_8php_source.html#l00911">TemplateStdLibExPlugin::handleTExtends()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_utils_8php_source.html">Utils.php</a></li>
</ul>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Fri Jan 14 2011 20:08:37 for SithTemplate by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
</body>
</html>
Return current item: SithTemplate