Location: PHPKode > projects > FOOWD > foowd/apidocs/Foowd/Lib/package-functions.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>

<title>Functions</title>

<link rel="stylesheet" type="text/css" href="../../stylesheet.css" />
<link rel="start" href="overview-summary.html" />

</head>

<body>

<table width="100%" cellpadding="0" class="header">
<tr><td class="header">
<a href="../../overview-summary.html">Overview</a>
<a href="package-summary.html">Package</a>
<a href="package-tree.html">Tree</a></td><td class="short_title">
FOOWD</td></tr>
</table>

<table width="100%" cellpadding="0" class="small_links">
<tr>
<td><a href="../../index.html" target="_top">FRAMES</a> <a href="package-functions.html" target="_top">NO FRAMES</a></td>
</tr>
<tr>
<td>SUMMARY: <a href="#summary">FUNCTIONS</a></td>
<td>DETAIL: <a href="#detail">FUNCTIONS</a></td>
</tr>
</table>

<hr />

<h1>Functions</h1>

<hr />

<br />
<a name="summary"></a>
<table width="100%" cellspacing="0" class="title">
<tr><th colspan="2" class="title">Summary</th></tr>
</table>

<table width="100%" cellspacing="0" class="body"><tr><td class="type">str</td><td class="description"><a href="#_">_</a><br />Fake Getext function. </td></tr><tr><td class="type">bool</td><td class="description"><a href="#classLoaded">classLoaded</a><br />Whether a class has been loaded. </td></tr><tr><td class="type">bool</td><td class="description"><a href="#cookieTest">cookieTest</a><br />Look for test cookie. </td></tr><tr><td class="type">bool</td><td class="description"><a href="#email">email</a><br />Send an e-mail. </td></tr><tr><td class="type">str</td><td class="description"><a href="#getClassDescription">getClassDescription</a><br />Get class description given the classid. </td></tr><tr><td class="type">str</td><td class="description"><a href="#getClassName">getClassName</a><br />Get class name given the classid. </td></tr><tr><td class="type">mixed</td><td class="description"><a href="#getConstOrDefault">getConstOrDefault</a><br />Return the value of a constant or a default value. </td></tr><tr><td class="type">array</td><td class="description"><a href="#getFoowdClassNames">getFoowdClassNames</a><br />Get the names of all Foowd classes loaded. </td></tr><tr><td class="type">str</td><td class="description"><a href="#getPermission">getPermission</a><br />Get the user group permission of a object or class method. </td></tr><tr><td class="type">str</td><td class="description"><a href="#getRegexLength">getRegexLength</a><br />Find the max length of string allowed by a regex. </td></tr><tr><td class="type">str</td><td class="description"><a href="#getTempDir">getTempDir</a><br />Get system temporary directory. </td></tr><tr><td class="type">bool</td><td class="description"><a href="#isFoowdObject">isFoowdObject</a><br />Whether a class is a Foowd object. </td></tr><tr><td class="type">str</td><td class="description"><a href="#mungEmail">mungEmail</a><br />Anti-spam an e-mail address. </td></tr><tr><td class="type">void</td><td class="description"><a href="#sendTestCookie">sendTestCookie</a><br />Test for cookies on client. </td></tr><tr><td class="type">void</td><td class="description"><a href="#setClassMeta">setClassMeta</a><br />Set class meta data. </td></tr><tr><td class="type">void</td><td class="description"><a href="#setConst">setConst</a><br />Set a constant to a value if the constant is defined. </td></tr><tr><td class="type">void</td><td class="description"><a href="#setPermission">setPermission</a><br />Set the user group permission of a object or class method. </td></tr><tr><td class="type">void</td><td class="description"><a href="#show">show</a><br />Display a variable in a formatted way. </td></tr><tr><td class="type">str</td><td class="description"><a href="#timeSince">timeSince</a><br />Return the time since a certain time in the past. </td></tr></table>
<br />
<hr />
<br />

<a name="detail"></a>
<table width="100%" cellspacing="0" class="title">
<tr><th class="title">Detail</th></tr>
</table>

<a name="_"></a><h2>_()</h2><code>str <strong>_</strong>(str text)</code><br /><p>Fake Getext function. </p><p>If Gettext support is not availble, this function acts as a passthru function in its place. </p><dl><dt>Parameters:</dt><dd><code>text</code> - Text to return </dd></dl><dl><dt>Returns:</dt><dd>The returned text. </dd></dl><hr /><a name="classLoaded"></a><h2>classLoaded()</h2><code>bool <strong>classLoaded</strong>(int classid)</code><br /><p>Whether a class has been loaded. </p><p>Uses the class meta data to see if the given classid has been loaded into the system. </p><dl><dt>Parameters:</dt><dd><code>classid</code> - The id of the class. </dd></dl><dl><dt>Returns:</dt><dd>TRUE if the class is loaded. </dd></dl><hr /><a name="cookieTest"></a><h2>cookieTest()</h2><code>bool <strong>cookieTest</strong>(object foowd)</code><br /><p>Look for test cookie. </p><p>This function looks for the test cookie sent by <code><a href="../Foowd/Lib/functions.html#sendTestCookie">sendTestCookie</a></code> to check that the client has cookie support availble. </p><dl><dt>Parameters:</dt><dd><code>foowd</code> - The foowd environment object. </dd></dl><dl><dt>Returns:</dt><dd>TRUE if cookie support was detected. </dd></dl><hr /><a name="email"></a><h2>email()</h2><code>bool <strong>email</strong>(object foowd, str to, str subject, str message, str headers, str para)</code><br /><p>Send an e-mail. </p><p>This function is a wrapper to the PHP mail function that includes writing debugging data to the debug stream. </p><dl><dt>Parameters:</dt><dd><code>foowd</code> - The foowd environment object. </dd><dd><code>to</code> - The e-mail address to send the e-mail to. </dd><dd><code>subject</code> - The subject of the e-mail. </dd><dd><code>message</code> - The message to send. </dd><dd><code>headers</code> - Additional e-mail headers. </dd><dd><code>para</code> - Additional e-mail parameters. </dd></dl><dl><dt>Returns:</dt><dd>TRUE on success. </dd></dl><hr /><a name="getClassDescription"></a><h2>getClassDescription()</h2><code>str <strong>getClassDescription</strong>(int classid)</code><br /><p>Get class description given the classid. </p><p></p><dl><dt>Parameters:</dt><dd><code>classid</code> - The id of the class. </dd></dl><dl><dt>Returns:</dt><dd>The class description. </dd></dl><hr /><a name="getClassName"></a><h2>getClassName()</h2><code>str <strong>getClassName</strong>(int classid)</code><br /><p>Get class name given the classid. </p><p></p><dl><dt>Parameters:</dt><dd><code>classid</code> - The id of the class. </dd></dl><dl><dt>Returns:</dt><dd>The class name. </dd></dl><hr /><a name="getConstOrDefault"></a><h2>getConstOrDefault()</h2><code>mixed <strong>getConstOrDefault</strong>(str constant, mixed default)</code><br /><p>Return the value of a constant or a default value. </p><p></p><dl><dt>Parameters:</dt><dd><code>constant</code> - Name of a constant. </dd><dd><code>default</code> - Default value. </dd></dl><dl><dt>Returns:</dt><dd>The value of the constant or the default value. </dd></dl><hr /><a name="getFoowdClassNames"></a><h2>getFoowdClassNames()</h2><code>array <strong>getFoowdClassNames</strong>()</code><br /><p>Get the names of all Foowd classes loaded. </p><p></p><dl><dt>Returns:</dt><dd>An array of class names. </dd></dl><hr /><a name="getPermission"></a><h2>getPermission()</h2><code>str <strong>getPermission</strong>(str className, str methodName, str type)</code><br /><p>Get the user group permission of a object or class method. </p><p></p><dl><dt>Parameters:</dt><dd><code>className</code> - Name of the class the method belongs to. </dd><dd><code>methodName</code> - Name of the method. </dd><dd><code>type</code> - Type of method, 'class' or 'object'. </dd></dl><dl><dt>Returns:</dt><dd>The user group string the permission is set to. </dd></dl><hr /><a name="getRegexLength"></a><h2>getRegexLength()</h2><code>str <strong>getRegexLength</strong>(str regex, int default)</code><br /><p>Find the max length of string allowed by a regex. </p><p></p><dl><dt>Parameters:</dt><dd><code>regex</code> - The regular expression to find the length of. </dd><dd><code>default</code> - The default length to return if we can not find a length in the regular expression. </dd></dl><dl><dt>Returns:</dt><dd>The maximum length allowed by a regular expression. </dd></dl><hr /><a name="getTempDir"></a><h2>getTempDir()</h2><code>str <strong>getTempDir</strong>()</code><br /><p>Get system temporary directory. </p><p></p><dl><dt>Returns:</dt><dd>The system temporary directory. </dd></dl><hr /><a name="isFoowdObject"></a><h2>isFoowdObject()</h2><code>bool <strong>isFoowdObject</strong>(str className)</code><br /><p>Whether a class is a Foowd object. </p><p></p><dl><dt>Parameters:</dt><dd><code>className</code> - The name of the class. </dd></dl><dl><dt>Returns:</dt><dd>TRUE if the class is a child of foowd_object. </dd></dl><hr /><a name="mungEmail"></a><h2>mungEmail()</h2><code>str <strong>mungEmail</strong>(str emailAddress)</code><br /><p>Anti-spam an e-mail address. </p><p></p><dl><dt>Parameters:</dt><dd><code>emailAddress</code> - E-mail address to mangle. </dd></dl><dl><dt>Returns:</dt><dd>Munged e-mail address. </dd></dl><hr /><a name="sendTestCookie"></a><h2>sendTestCookie()</h2><code>void <strong>sendTestCookie</strong>(object foowd)</code><br /><p>Test for cookies on client. </p><p>This function sends a test cookie to the client which can be used by <code><a href="../Foowd/Lib/functions.html#cookieTest">cookieTest</a></code> to check that the client has cookie support availble. </p><dl><dt>Parameters:</dt><dd><code>foowd</code> - The foowd environment object. </dd></dl><hr /><a name="setClassMeta"></a><h2>setClassMeta()</h2><code>void <strong>setClassMeta</strong>(str className, str description)</code><br /><p>Set class meta data. </p><p></p><dl><dt>Parameters:</dt><dd><code>className</code> - Name of the class. </dd><dd><code>description</code> - Text description of the class. </dd></dl><hr /><a name="setConst"></a><h2>setConst()</h2><code>void <strong>setConst</strong>(str constName, mixed value)</code><br /><p>Set a constant to a value if the constant is defined. </p><p></p><dl><dt>Parameters:</dt><dd><code>constName</code> - Name of a constant. </dd><dd><code>value</code> - The value to set. </dd></dl><hr /><a name="setPermission"></a><h2>setPermission()</h2><code>void <strong>setPermission</strong>(str className, str type, str methodName, str value)</code><br /><p>Set the user group permission of a object or class method. </p><p></p><dl><dt>Parameters:</dt><dd><code>className</code> - Name of the class the method belongs to. </dd><dd><code>type</code> - Type of method, 'class' or 'object'. </dd><dd><code>methodName</code> - Name of the method. </dd><dd><code>value</code> - User group string to set the permission to. </dd></dl><hr /><a name="show"></a><h2>show()</h2><code>void <strong>show</strong>(mixed var)</code><br /><p>Display a variable in a formatted way. </p><p></p><dl><dt>Parameters:</dt><dd><code>var</code> - Variable to output. </dd></dl><hr /><a name="timeSince"></a><h2>timeSince()</h2><code>str <strong>timeSince</strong>(int time)</code><br /><p>Return the time since a certain time in the past. </p><p></p><dl><dt>Parameters:</dt><dd><code>time</code> - The time in the past as a Unix timestamp. </dd></dl><dl><dt>Returns:</dt><dd>A string representation of roughly how long has passed. </dd></dl><hr />
<table width="100%" cellpadding="0" class="header">
<tr><td class="header">
<a href="../../overview-summary.html">Overview</a>
<a href="package-summary.html">Package</a>
<a href="package-tree.html">Tree</a></td><td class="short_title">
FOOWD</td></tr>
</table>

<table width="100%" cellpadding="0" class="small_links">
<tr>
<td><a href="../../index.html" target="_top">FRAMES</a> <a href="package-functions.html" target="_top">NO FRAMES</a></td>
</tr>
<tr>
<td>SUMMARY: <a href="#summary">FUNCTIONS</a></td>
<td>DETAIL: <a href="#detail">FUNCTIONS</a></td>
</tr>
</table>

<hr />

<p class="footer">This document was generated by <a href="http://phpdoctor.sourceforge.net/">PHPDoctor: The PHP Documentation Creator</a>.</p>
</body>
</html>
Return current item: FOOWD