1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-22 16:33:00 +00:00
Pepperminty-Wiki/docs/ModuleApi/namespaces/default.html

3374 lines
178 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>Pepperminty Wiki Module API</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
<link href="../css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="../css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="../js/html5.js"></script>
<![endif]-->
<script src="../js/jquery-1.11.0.min.js"></script>
<script src="../js/ui/1.10.4/jquery-ui.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">Pepperminty Wiki Module API</a>
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i>&#160;Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">84</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
<a href="../reports/deprecated.html">
<i class="icon-list-alt"></i>&#160;Deprecated <span class="label label-info pull-right">0</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1463210363"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1463210363" class="accordion-body collapse in">
<div class="accordion-inner">
<ul>
<li class="class"><a href="../classes/ids.html">ids</a></li>
<li class="class"><a href="../classes/page_renderer.html">page_renderer</a></li>
<li class="class"><a href="../classes/PeppermintParsedown.html">PeppermintParsedown</a></li>
<li class="class"><a href="../classes/search.html">search</a></li>
<li class="class"><a href="../classes/Slimdown.html">Slimdown</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content namespace">
<nav>
</nav>
<h1><small></small>\</h1>
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/ids.html">ids</a></td>
<td><em>Provides an interface to interact with page ids.</em></td>
</tr>
<tr>
<td><a href="../classes/page_renderer.html">page_renderer</a></td>
<td><em>Renders the HTML page that is sent to the client.</em></td>
</tr>
<tr>
<td><a href="../classes/PeppermintParsedown.html">PeppermintParsedown</a></td>
<td><em></em></td>
</tr>
<tr>
<td><a href="../classes/search.html">search</a></td>
<td><em></em></td>
</tr>
<tr>
<td><a href="../classes/Slimdown.html">Slimdown</a></td>
<td><em>Modified by Starbeamrainbowlabs (starbeamrainbowlabs)</em></td>
</tr>
</table>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>Namespace hierarchy</dt>
<dd class="hierarchy">
<div class="namespace-wrapper">\</div>
</dd>
</dl>
</aside>
</div>
<div class="row-fluid">
<section class="span8 content namespace">
<h2>Functions</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_accept_contains_mime" name="method_accept_contains_mime" class="anchor"></a>
<article class="method">
<h3 class=" ">accept_contains_mime()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">accept_contains_mime(string <span class="argument">$accept_header</span>, string <span class="argument">$mime_type</span>) : boolean</pre>
<p><em>Figures out whether a given http accepts header contains a
specified mime type.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$accept_header </td>
<td><p>The accept header to search.</p></td>
</tr>
<tr>
<td>string</td>
<td>$mime_type </td>
<td><p>The mime type to search for.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether the specified mime type was found
in the specified accepts header.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_add_action" name="method_add_action" class="anchor"></a>
<article class="method">
<h3 class=" ">add_action()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">add_action(string <span class="argument">$action_name</span>, \function <span class="argument">$func</span>) </pre>
<p><em>Registers a new action handler.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$action_name </td>
<td><p>The action to register.</p></td>
</tr>
<tr>
<td>\function</td>
<td>$func </td>
<td><p>The function to call when the specified
action is requested.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_add_help_section" name="method_add_help_section" class="anchor"></a>
<article class="method">
<h3 class=" ">add_help_section()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">add_help_section(string <span class="argument">$index</span>, string <span class="argument">$title</span>, string <span class="argument">$content</span>) </pre>
<p><em>Adds a new help section to the help page.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$index </td>
<td><p>The string to index the new section under.</p></td>
</tr>
<tr>
<td>string</td>
<td>$title </td>
<td><p>The title to display above the section.</p></td>
</tr>
<tr>
<td>string</td>
<td>$content </td>
<td><p>The content to display.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_add_parser" name="method_add_parser" class="anchor"></a>
<article class="method">
<h3 class=" ">add_parser()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">add_parser(string <span class="argument">$name</span>, \function <span class="argument">$parser_code</span>) </pre>
<p><em>Registers a new parser.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$name </td>
<td><p>The name of the new parser to register.</p></td>
</tr>
<tr>
<td>\function</td>
<td>$parser_code </td>
<td><p>The function to register as a new parser.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_add_recent_change" name="method_add_recent_change" class="anchor"></a>
<article class="method">
<h3 class=" ">add_recent_change()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">add_recent_change(array <span class="argument">$rchange</span>) </pre>
<p><em>Adds a new recent change to the recent changes file.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$rchange </td>
<td><p>The new change to add.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-recent-changes</p>
<p>feature-recent-changes</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_check_subpage_parents" name="method_check_subpage_parents" class="anchor"></a>
<article class="method">
<h3 class=" ">check_subpage_parents()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">check_subpage_parents( <span class="argument">$pagename</span>) </pre>
<p><em>Makes sure that a subpage&#039;s parents exist.</em></p>
<p>Note this doesn't check the pagename itself.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$pagename </td>
<td><p>The pagename to check.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_email_user" name="method_email_user" class="anchor"></a>
<article class="method">
<h3 class=" ">email_user()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">email_user(string <span class="argument">$username</span>, string <span class="argument">$subject</span>, string <span class="argument">$body</span>) : boolean</pre>
<p><em>Sends a plain text email to a user, replacing {username} with the specified username.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$username </td>
<td><p>The username to send the email to.</p></td>
</tr>
<tr>
<td>string</td>
<td>$subject </td>
<td><p>The subject of the email.</p></td>
</tr>
<tr>
<td>string</td>
<td>$body </td>
<td><p>The body of the email.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether the email was sent successfully or not. Currently, this may fail if the user doesn't have a registered email address.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_email_users" name="method_email_users" class="anchor"></a>
<article class="method">
<h3 class=" ">email_users()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">email_users(array&lt;mixed,string&gt; <span class="argument">$usernames</span>, string <span class="argument">$subject</span>, string <span class="argument">$body</span>) : integer</pre>
<p><em>Sends a plain text email to a list of users, replacing {username} with each user&#039;s name.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array&lt;mixed,string&gt;</td>
<td>$usernames </td>
<td><p>A list of usernames to email.</p></td>
</tr>
<tr>
<td>string</td>
<td>$subject </td>
<td><p>The subject of the email.</p></td>
</tr>
<tr>
<td>string</td>
<td>$body </td>
<td><p>The body of the email.</p></td>
</tr>
</table>
<h4>Returns</h4>
integer
&mdash; <p>The number of emails sent successfully.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_endsWith" name="method_endsWith" class="anchor"></a>
<article class="method">
<h3 class=" ">endsWith()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">endsWith(string <span class="argument">$whole</span>, string <span class="argument">$end</span>) : boolean</pre>
<p><em>Tests whether a string ends with a given substring.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$whole </td>
<td><p>The string to test against.</p></td>
</tr>
<tr>
<td>string</td>
<td>$end </td>
<td><p>The substring test for.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether $whole ends in $end.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_errorimage" name="method_errorimage" class="anchor"></a>
<article class="method">
<h3 class=" ">errorimage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">errorimage(string <span class="argument">$text</span>, integer <span class="argument">$target_size = null</span>) : \image</pre>
<p><em>Creates an images containing the specified text.</em></p>
<p>Useful for sending errors back to the client.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$text </td>
<td><p>The text to include in the image.</p></td>
</tr>
<tr>
<td>integer</td>
<td>$target_size </td>
<td><p>The target width to aim for when creating
the image.</p></td>
</tr>
</table>
<h4>Returns</h4>
\image
&mdash; <p>The handle to the generated GD image.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-upload</p>
<p>feature-upload</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_extract_user_from_userpage" name="method_extract_user_from_userpage" class="anchor"></a>
<article class="method">
<h3 class=" ">extract_user_from_userpage()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">extract_user_from_userpage(string <span class="argument">$userPagename</span>) : string</pre>
<p><em>Extracts a username from a user page path.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$userPagename </td>
<td><p>The suer page path to extract from.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The name of the user that the user page belongs to.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_fetch_comment_thread" name="method_fetch_comment_thread" class="anchor"></a>
<article class="method">
<h3 class=" ">fetch_comment_thread()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">fetch_comment_thread(array <span class="argument">$comment_data</span>, string <span class="argument">$comment_id</span>) : array&lt;mixed,object&gt;</pre>
<p><em>Fetches all the parent comments of the specified comment id, including the
comment itself at the end.</em></p>
<p>Useful for figuring out who needs notifying when a new comment is posted.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$comment_data </td>
<td><p>The comment data to search.</p></td>
</tr>
<tr>
<td>string</td>
<td>$comment_id </td>
<td><p>The comment id to fetch the thread for.</p></td>
</tr>
</table>
<h4>Returns</h4>
array&lt;mixed,object&gt;
&mdash; <p>A list of the comments in the thread, with the deepest
one at the end.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-comments</p>
<p>feature-comments</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_find_comment" name="method_find_comment" class="anchor"></a>
<article class="method">
<h3 class=" ">find_comment()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">find_comment(array <span class="argument">$comment_data</span>, string <span class="argument">$comment_id</span>) : object</pre>
<p><em>Finds the comment with specified id by way of an almost-breadth-first search.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$comment_data </td>
<td><p>The comment data to search.</p></td>
</tr>
<tr>
<td>string</td>
<td>$comment_id </td>
<td><p>The id of the comment to find.</p></td>
</tr>
</table>
<h4>Returns</h4>
object
&mdash; <p>The comment data with the specified id, or
false if it wasn't found.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-comments</p>
<p>feature-comments</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_full_url" name="method_full_url" class="anchor"></a>
<article class="method">
<h3 class=" ">full_url()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">full_url(array <span class="argument">$s = false</span>, boolean <span class="argument">$use_forwarded_host = false</span>) : string</pre>
<p><em>Get the full url, as requested by the client.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$s </td>
<td><p>The $_SERVER variable. Defaults to $_SERVER.</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$use_forwarded_host </td>
<td><p>Whether to take the X-Forwarded-Host header into account.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The full url, as requested by the client.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/8891890/1460422"><span class="namespace-wrapper">This Stackoverflow answer.</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_generate_comment_id" name="method_generate_comment_id" class="anchor"></a>
<article class="method">
<h3 class=" ">generate_comment_id()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">generate_comment_id() : string</pre>
<p><em>Generates a new random comment id.</em></p>
<h4>Returns</h4>
string
&mdash; <p>A new random comment id.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-comments</p>
<p>feature-comments</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_generate_page_list" name="method_generate_page_list" class="anchor"></a>
<article class="method">
<h3 class=" ">generate_page_list()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">generate_page_list(array&lt;mixed,string&gt; <span class="argument">$pagelist</span>) : string</pre>
<p><em>Renders a list of pages as HTML.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array&lt;mixed,string&gt;</td>
<td>$pagelist </td>
<td><p>A list of page names to include in the list.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The specified list of pages as HTML.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>page-list</p>
<p>page-list</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_comment_filename" name="method_get_comment_filename" class="anchor"></a>
<article class="method">
<h3 class=" ">get_comment_filename()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get_comment_filename(string <span class="argument">$pagename</span>) : string</pre>
<p><em>Given a page name, returns the absolute file path in which that page&#039;s
comments are stored.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$pagename </td>
<td><p>The name pf the page to fetch the comments filename for.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The path to the file that the</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-comments</p>
<p>feature-comments</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_max_upload_size" name="method_get_max_upload_size" class="anchor"></a>
<article class="method">
<h3 class=" ">get_max_upload_size()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get_max_upload_size() : integer</pre>
<p><em>Calculates the actual maximum upload size supported by the server
Returns a file size limit in bytes based on the PHP upload_max_filesize and
post_max_size</em></p>
<h4>Returns</h4>
integer
&mdash; <p>The maximum upload size supported bythe server, in bytes.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/25370978/1460422"><span class="namespace-wrapper">Source Stackoverflow answer</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-upload</p>
<p>feature-upload</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Lifted from Drupal by @meustrus from Stackoverflow</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_page_parent" name="method_get_page_parent" class="anchor"></a>
<article class="method">
<h3 class=" ">get_page_parent()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get_page_parent(string <span class="argument">$pagename</span>) : string|boolean</pre>
<p><em>Gets the name of the parent page to the specified page.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$pagename </td>
<td><p>The child page to get the parent
page name for.</p></td>
</tr>
</table>
<h4>Returns</h4>
string|boolean
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
since
</th>
<td>
0.15
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_subpages" name="method_get_subpages" class="anchor"></a>
<article class="method">
<h3 class=" ">get_subpages()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get_subpages(object <span class="argument">$pageindex</span>, string <span class="argument">$pagename</span>) : object</pre>
<p><em>Gets a list of all the sub pages of the current page.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>object</td>
<td>$pageindex </td>
<td><p>The pageindex to use to search.</p></td>
</tr>
<tr>
<td>string</td>
<td>$pagename </td>
<td><p>The name of the page to list the sub pages of.</p></td>
</tr>
</table>
<h4>Returns</h4>
object
&mdash; <p>An object containing all the subpages and their
respective distances from the given page name in the pageindex tree.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_user_pagename" name="method_get_user_pagename" class="anchor"></a>
<article class="method">
<h3 class=" ">get_user_pagename()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">get_user_pagename(string <span class="argument">$username</span>) : string</pre>
<p><em>Figures out the path to the user page for a given username.</em></p>
<p>Does not check to make sure the user acutally exists.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$username </td>
<td><p>The username to get the path to their user page for.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The path to the given user's page.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getallheaders" name="method_getallheaders" class="anchor"></a>
<article class="method">
<h3 class=" ">getallheaders()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getallheaders() </pre>
<p><em>Polyfill for PHP&#039;s native getallheaders() function on platforms that
don&#039;t have it.</em></p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
<p>Identify which platforms don't have it and whether we still need this</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_getsvgsize" name="method_getsvgsize" class="anchor"></a>
<article class="method">
<h3 class=" ">getsvgsize()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">getsvgsize(string <span class="argument">$svgFilename</span>) : array&lt;mixed,integer&gt;</pre>
<p><em>Calculates the size of the specified SVG file.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$svgFilename </td>
<td><p>The filename to calculate the size of.</p></td>
</tr>
</table>
<h4>Returns</h4>
array&lt;mixed,integer&gt;
&mdash; <p>The width and height respectively of the
specified SVG file.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-upload</p>
<p>feature-upload</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_glob_recursive" name="method_glob_recursive" class="anchor"></a>
<article class="method">
<h3 class=" ">glob_recursive()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">glob_recursive(string <span class="argument">$pattern</span>, integer <span class="argument">$flags</span>) : array</pre>
<p><em>A recursive glob() function.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$pattern </td>
<td><p>The glob pattern to use to find filenames.</p></td>
</tr>
<tr>
<td>integer</td>
<td>$flags </td>
<td><p>The glob flags to use when finding filenames.</p></td>
</tr>
</table>
<h4>Returns</h4>
array
&mdash; <p>An array of the filepaths that match the given glob.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://in.php.net/manual/en/function.glob.php#106595"><span class="namespace-wrapper">The original source</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Mike</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_has_action" name="method_has_action" class="anchor"></a>
<article class="method">
<h3 class=" ">has_action()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">has_action(string <span class="argument">$action_name</span>) : boolean</pre>
<p><em>Figures out whether a given action is currently registered.</em></p>
<p>Only guaranteed to be accurate in inside an existing action function</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$action_name </td>
<td><p>The name of the action to search for</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether an action with the specified name exists.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_has_statistic" name="method_has_statistic" class="anchor"></a>
<article class="method">
<h3 class=" ">has_statistic()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">has_statistic(string <span class="argument">$stat_id</span>) : boolean</pre>
<p><em>Checks whether a specified statistic has been registered.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$stat_id </td>
<td><p>The id of the statistic to check the existence of.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether the specified statistic has been registered.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_hash_password" name="method_hash_password" class="anchor"></a>
<article class="method">
<h3 class=" ">hash_password()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">hash_password(string <span class="argument">$pass</span>) : string</pre>
<p><em>Hashes the given password according to the current settings defined
in $settings.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$pass </td>
<td><p>The password to hash.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The hashed password. Uses sha3 if $settings-&gt;use_sha3 is
enabled, or sha256 otherwise.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>page-login</p>
<p>page-login</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_hide_email" name="method_hide_email" class="anchor"></a>
<article class="method">
<h3 class=" ">hide_email()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">hide_email(string <span class="argument">$str</span>) : string</pre>
<p><em>Hides an email address from bots by adding random html entities.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$str </td>
<td><p>The original email address</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The mangled email address.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
todo
</th>
<td>
<p>Make this moree clevererer :D</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_history_add_revision" name="method_history_add_revision" class="anchor"></a>
<article class="method">
<h3 class=" ">history_add_revision()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">history_add_revision( <span class="argument">$pageinfo</span>, <span class="argument">$newsource</span>, <span class="argument">$oldsource</span>, <span class="argument">$save_pageindex = true</span>) </pre>
<p><em></em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$pageinfo </td>
<td></td>
</tr>
<tr>
<td></td>
<td>$newsource </td>
<td></td>
</tr>
<tr>
<td></td>
<td>$oldsource </td>
<td></td>
</tr>
<tr>
<td></td>
<td>$save_pageindex </td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>Default</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_human_filesize" name="method_human_filesize" class="anchor"></a>
<article class="method">
<h3 class=" ">human_filesize()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">human_filesize(\number <span class="argument">$bytes</span>, \number <span class="argument">$decimals = 2</span>) : string</pre>
<p><em>Converts a filesize into a human-readable string.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\number</td>
<td>$bytes </td>
<td><p>The number of bytes to convert.</p></td>
</tr>
<tr>
<td>\number</td>
<td>$decimals </td>
<td><p>The number of decimal places to preserve.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>A human-readable filesize.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://php.net/manual/en/function.filesize.php#106569"><span class="namespace-wrapper">The original source</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>rommel</p>
<p>Edited by Starbeamrainbowlabs</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_human_time" name="method_human_time" class="anchor"></a>
<article class="method">
<h3 class=" ">human_time()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">human_time(integer <span class="argument">$seconds</span>) : string</pre>
<p><em>Renders a given number of seconds as something that humans can understand more easily.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>integer</td>
<td>$seconds </td>
<td><p>The number of seconds to render.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The rendered time.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_human_time_since" name="method_human_time_since" class="anchor"></a>
<article class="method">
<h3 class=" ">human_time_since()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">human_time_since(integer <span class="argument">$time</span>) : string</pre>
<p><em>Calculates the time since a particular timestamp and returns a
human-readable result.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>integer</td>
<td>$time </td>
<td><p>The timestamp to convert.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The time since the given timestamp as
a human-readable string.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://goo.gl/zpgLgq"><span class="namespace-wrapper">The original source. No longer exists, maybe the wayback machine caught it :-(</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_makepathsafe" name="method_makepathsafe" class="anchor"></a>
<article class="method">
<h3 class=" ">makepathsafe()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">makepathsafe(string <span class="argument">$string</span>) : string</pre>
<p><em>Makes a path safe.</em></p>
<p>Paths may only contain alphanumeric characters, spaces, underscores, and
dashes.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$string </td>
<td><p>The string to make safe.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>A safe version of the given string.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_mb_stripos_all" name="method_mb_stripos_all" class="anchor"></a>
<article class="method">
<h3 class=" ">mb_stripos_all()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">mb_stripos_all(string <span class="argument">$haystack</span>, string <span class="argument">$needle</span>) : array|false</pre>
<p><em>Case-insensitively finds all occurrences of $needle in $haystack. Handles
UTF-8 characters correctly.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$haystack </td>
<td><p>The string to search.</p></td>
</tr>
<tr>
<td>string</td>
<td>$needle </td>
<td><p>The string to find.</p></td>
</tr>
</table>
<h4>Returns</h4>
array|false
&mdash; <p>An array of match indices, or false if
nothing was found.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://www.pontikis.net/tip/%3Fid%3D16"><span class="namespace-wrapper">the source</span></a></dd>
<dd><a href="http://www.php.net/manual/en/function.strpos.php#87061"><span class="namespace-wrapper">the source that the above was based on</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_module_exists" name="method_module_exists" class="anchor"></a>
<article class="method">
<h3 class=" ">module_exists()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">module_exists(string <span class="argument">$id</span>) : boolean</pre>
<p><em>Checks to see whether a module with the given id exists.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$id </td>
<td><p>The id to search for.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether a module is currently loaded with the given id.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_parse_page_source" name="method_parse_page_source" class="anchor"></a>
<article class="method">
<h3 class=" ">parse_page_source()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">parse_page_source(string <span class="argument">$source</span>) : string</pre>
<p><em>Parses the specified page source using the parser specified in the settings
into HTML.</em></p>
<p>The specified parser may (though it's unilkely) render it to other things.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$source </td>
<td><p>The source to render.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The source rendered to HTML.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_parse_size" name="method_parse_size" class="anchor"></a>
<article class="method">
<h3 class=" ">parse_size()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">parse_size(string <span class="argument">$size</span>) : integer</pre>
<p><em>Parses a PHP size to an integer</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$size </td>
<td><p>The size to parse.</p></td>
</tr>
</table>
<h4>Returns</h4>
integer
&mdash; <p>The number of bytees represented by the specified
size string.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/25370978/1460422"><span class="namespace-wrapper">Source Stackoverflow answer</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-upload</p>
<p>feature-upload</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>Lifted from Drupal by @meustrus from Stackoverflow</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_register_module" name="method_register_module" class="anchor"></a>
<article class="method">
<h3 class=" ">register_module()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">register_module(array <span class="argument">$moduledata</span>) </pre>
<p><em>Registers a module.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$moduledata </td>
<td><p>The module data to register.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_register_save_preprocessor" name="method_register_save_preprocessor" class="anchor"></a>
<article class="method">
<h3 class=" ">register_save_preprocessor()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">register_save_preprocessor(\function <span class="argument">$func</span>) </pre>
<p><em>Register a new proprocessor that will be executed just before
an edit is saved.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>\function</td>
<td>$func </td>
<td><p>The function to register.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_comments" name="method_render_comments" class="anchor"></a>
<article class="method">
<h3 class=" ">render_comments()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_comments(array&lt;mixed,object&gt; <span class="argument">$comments_data</span>, integer <span class="argument">$depth</span>) : string</pre>
<p><em>Renders a given comments tree to html.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array&lt;mixed,object&gt;</td>
<td>$comments_data </td>
<td><p>The comments tree to render.</p></td>
</tr>
<tr>
<td>integer</td>
<td>$depth </td>
<td><p>For internal use only. Specifies the depth
at which the comments are being rendered.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The given comments tree as html.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-comments</p>
<p>feature-comments</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_editor" name="method_render_editor" class="anchor"></a>
<article class="method">
<h3 class=" ">render_editor()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_editor(string <span class="argument">$editorName</span>) : string</pre>
<p><em>Renders an editor&#039;s or a group of editors name(s) in HTML.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$editorName </td>
<td><p>The name of the editor to render.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>HTML representing the given editor's name.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_pagename" name="method_render_pagename" class="anchor"></a>
<article class="method">
<h3 class=" ">render_pagename()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_pagename(object <span class="argument">$rchange</span>) : string</pre>
<p><em>Renders a page name in HTML.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>object</td>
<td>$rchange </td>
<td><p>The recent change to render as a page name</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>HTML representing the name of the given page.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_recent_change" name="method_render_recent_change" class="anchor"></a>
<article class="method">
<h3 class=" ">render_recent_change()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_recent_change(object <span class="argument">$rchange</span>) : string</pre>
<p><em>Renders a single recent change</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>object</td>
<td>$rchange </td>
<td><p>The recent change to render.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The recent change, rendered to HTML.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-recent-changes</p>
<p>feature-recent-changes</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_recent_changes" name="method_render_recent_changes" class="anchor"></a>
<article class="method">
<h3 class=" ">render_recent_changes()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_recent_changes(array <span class="argument">$recent_changes</span>) : string</pre>
<p><em>Renders a list of recent changes to HTML.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$recent_changes </td>
<td><p>The recent changes to render.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The given recent changes as HTML.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-recent-changes</p>
<p>feature-recent-changes</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_sidebar" name="method_render_sidebar" class="anchor"></a>
<article class="method">
<h3 class=" ">render_sidebar()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_sidebar(array <span class="argument">$pageindex</span>, string <span class="argument">$root_pagename = &quot;&quot;</span>) : string</pre>
<p><em>Renders the sidebar for a given pageindex.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$pageindex </td>
<td><p>The pageindex to render the sidebar for</p></td>
</tr>
<tr>
<td>string</td>
<td>$root_pagename </td>
<td><p>The pagename that should be considered the root of the rendering. You don't usually need to use this, it is used by the algorithm itself since it is recursive.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>A HTML rendering of the sidebar for the given pageindex.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>extra-sidebar</p>
<p>extra-sidebar</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_timestamp" name="method_render_timestamp" class="anchor"></a>
<article class="method">
<h3 class=" ">render_timestamp()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">render_timestamp(integer <span class="argument">$timestamp</span>) : string</pre>
<p><em>Renders a timestamp in HTML.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>integer</td>
<td>$timestamp </td>
<td><p>The timestamp to render.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>HTML representing the given timestamp.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
<article class="method">
<h3 class=" ">save_userdata()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
<p><em>Saves the currently logged in uesr&#039;s data back to peppermint.json.</em></p>
<h4>Returns</h4>
boolean
&mdash; <p>Whether the user's data was saved successfully. Returns false if the user isn't logged in.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_stack_trace" name="method_stack_trace" class="anchor"></a>
<article class="method">
<h3 class=" ">stack_trace()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">stack_trace(boolean <span class="argument">$log_trace = true</span>, boolean <span class="argument">$full = false</span>) : string</pre>
<p><em>Generates a stack trace.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>boolean</td>
<td>$log_trace </td>
<td><p>Whether to send the stack trace to the error log.</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$full </td>
<td><p>Whether to output a full description of all the variables involved.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>A string prepresentation of a stack trace.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_starts_with" name="method_starts_with" class="anchor"></a>
<article class="method">
<h3 class=" ">starts_with()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">starts_with(string <span class="argument">$haystack</span>, string <span class="argument">$needle</span>) : boolean</pre>
<p><em>Checks to see if $haystack starts with $needle.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$haystack </td>
<td><p>The string to search.</p></td>
</tr>
<tr>
<td>string</td>
<td>$needle </td>
<td><p>The string to search for at the beginning
of $haystack.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether $needle can be found at the beginning
of $haystack.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_startsWith" name="method_startsWith" class="anchor"></a>
<article class="method">
<h3 class=" ">startsWith()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">startsWith(string <span class="argument">$haystack</span>, string <span class="argument">$needle</span>) : boolean</pre>
<p><em>Tests whether a string starts with a specified substring.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$haystack </td>
<td><p>The string to check against.</p></td>
</tr>
<tr>
<td>string</td>
<td>$needle </td>
<td><p>The substring to look for.</p></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether the string starts with the specified substring.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_statistic_add" name="method_statistic_add" class="anchor"></a>
<article class="method">
<h3 class=" ">statistic_add()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">statistic_add(array <span class="argument">$stat_data</span>) </pre>
<p><em>Registers a statistic calculator against the system.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$stat_data </td>
<td><p>The statistic object to register.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_stats_load" name="method_stats_load" class="anchor"></a>
<article class="method">
<h3 class=" ">stats_load()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">stats_load() : object</pre>
<p><em>Loads and returns the statistics cache file.</em></p>
<h4>Returns</h4>
object
&mdash; <p>The loaded &amp; decoded statistics.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-stats</p>
<p>feature-stats</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_stats_save" name="method_stats_save" class="anchor"></a>
<article class="method">
<h3 class=" ">stats_save()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">stats_save( <span class="argument">$stats</span>) : boolean</pre>
<p><em>Saves the statistics back to disk.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$stats </td>
<td></td>
</tr>
</table>
<h4>Returns</h4>
boolean
&mdash; <p>Whether saving succeeded or not.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-stats</p>
<p>feature-stats</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_str_replace_once" name="method_str_replace_once" class="anchor"></a>
<article class="method">
<h3 class=" ">str_replace_once()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">str_replace_once(string <span class="argument">$find</span>, string <span class="argument">$replace</span>, string <span class="argument">$subject</span>) : string</pre>
<p><em>Replaces the first occurrence of $find with $replace.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$find </td>
<td><p>The string to search for.</p></td>
</tr>
<tr>
<td>string</td>
<td>$replace </td>
<td><p>The string to replace the search string with.</p></td>
</tr>
<tr>
<td>string</td>
<td>$subject </td>
<td><p>The string ot perform the search and replace on.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The source string after the find and replace has been performed.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_system_extension_mime_type" name="method_system_extension_mime_type" class="anchor"></a>
<article class="method">
<h3 class=" ">system_extension_mime_type()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">system_extension_mime_type(string <span class="argument">$ext</span>) : string</pre>
<p><em>Converts a given file extension to it&#039;s associated mime type.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$ext </td>
<td><p>The extension to convert.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The mime type associated with the given extension.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/1147952/1460422"><span class="namespace-wrapper">From this stackoverflow answer</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>chaos</p>
<p>Edited by Starbeamrainbowlabs</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_system_extension_mime_types" name="method_system_extension_mime_types" class="anchor"></a>
<article class="method">
<h3 class=" ">system_extension_mime_types()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">system_extension_mime_types() : array</pre>
<p><em>Returns the system MIME type mapping of extensions to MIME types.</em></p>
<h4>Returns</h4>
array
&mdash; <p>An array mapping file extensions to their associated mime types.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/1147952/1460422"><span class="namespace-wrapper">From this stackoverflow answer</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>chaos</p>
<p>Edited by Starbeamrainbowlabs</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_system_mime_type_extension" name="method_system_mime_type_extension" class="anchor"></a>
<article class="method">
<h3 class=" ">system_mime_type_extension()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">system_mime_type_extension(string <span class="argument">$type</span>) : string</pre>
<p><em>Converts a given mime type to it&#039;s associated file extension.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$type </td>
<td><p>The mime type to convert.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The extension for the given mime type.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/1147952/1460422"><span class="namespace-wrapper">From this stackoverflow answer</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>chaos</p>
<p>Edited by Starbeamrainbowlabs</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_system_mime_type_extensions" name="method_system_mime_type_extensions" class="anchor"></a>
<article class="method">
<h3 class=" ">system_mime_type_extensions()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">system_mime_type_extensions() : array</pre>
<p><em>Returns the system&#039;s mime type mappings, considering the first extension
listed to be cacnonical.</em></p>
<h4>Returns</h4>
array
&mdash; <p>An array of mime type mappings.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
<dt>See also</dt>
<dd><a href="http://stackoverflow.com/a/1147952/1460422"><span class="namespace-wrapper">From this stackoverflow answer</span></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
<tr>
<th>
author
</th>
<td>
<p>chaos</p>
<p>Edited by Starbeamrainbowlabs</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_update_statistics" name="method_update_statistics" class="anchor"></a>
<article class="method">
<h3 class=" ">update_statistics()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">update_statistics( <span class="argument">$update_all = false</span>) </pre>
<p><em></em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td></td>
<td>$update_all </td>
<td></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>Default</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_upload_check_svg" name="method_upload_check_svg" class="anchor"></a>
<article class="method">
<h3 class=" ">upload_check_svg()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">upload_check_svg(string <span class="argument">$temp_filename</span>) : array&lt;mixed,integer&gt;</pre>
<p><em>Checks an uploaded SVG file to make sure it&#039;s (at least somewhat) safe.</em></p>
<p>Sends an error to the client if a problem is found.</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$temp_filename </td>
<td><p>The filename of the SVG file to check.</p></td>
</tr>
</table>
<h4>Returns</h4>
array&lt;mixed,integer&gt;
&mdash; <p>The size of the SVG image.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>feature-upload</p>
<p>feature-upload</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_url_origin" name="method_url_origin" class="anchor"></a>
<article class="method">
<h3 class=" ">url_origin()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">url_origin(array <span class="argument">$s = false</span>, boolean <span class="argument">$use_forwarded_host = false</span>) : string</pre>
<p><em>Get the actual absolute origin of the request sent by the user.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>array</td>
<td>$s </td>
<td><p>The $_SERVER variable contents. Defaults to $_SERVER.</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$use_forwarded_host </td>
<td><p>Whether to utilise the X-Forwarded-Host header when calculating the actual origin.</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The actual origin of the user's request.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_var_dump_ret" name="method_var_dump_ret" class="anchor"></a>
<article class="method">
<h3 class=" ">var_dump_ret()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">var_dump_ret(mixed <span class="argument">$var</span>) : string</pre>
<p><em>Calls var_dump() and returns the output.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$var </td>
<td><p>The thing to pass to var_dump().</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>The output captured from var_dump().</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_var_dump_short" name="method_var_dump_short" class="anchor"></a>
<article class="method">
<h3 class=" ">var_dump_short()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">var_dump_short(mixed <span class="argument">$var</span>) : string</pre>
<p><em>Calls var_dump(), shortening the output for various types.</em></p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>mixed</td>
<td>$var </td>
<td><p>The thing to pass to var_dump().</p></td>
</tr>
</table>
<h4>Returns</h4>
string
&mdash; <p>A shortened version of the var_dump() output.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper"></div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>core</p>
<p>core</p>
</td>
</tr>
</table>
</aside>
</div>
</div>
</section>
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="../graphs/class.html">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="../reports/errors.html">Errors</a></li>
<li><a href="../reports/markers.html">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on September 16th, 2017 at 10:22.
</section>
</section>
</section>
</footer>
</div>
</body>
</html>