3009 lines
68 KiB
HTML
3009 lines
68 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="generator" content="ApiGen 2.8.0" />
|
|
|
|
<title>Class Slim\Slim | GeoApi</title>
|
|
|
|
<script type="text/javascript" src="resources/combined.js?3762770784"></script>
|
|
<script type="text/javascript" src="elementlist.js?3400632557"></script>
|
|
<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div id="left">
|
|
<div id="menu">
|
|
<a href="index.html" title="Overview"><span>Overview</span></a>
|
|
|
|
|
|
<div id="groups">
|
|
<h3>Namespaces</h3>
|
|
<ul>
|
|
<li><a href="namespace-api.html">api</a>
|
|
</li>
|
|
<li><a href="namespace-config.html">config</a>
|
|
</li>
|
|
<li><a href="namespace-database.html">database</a>
|
|
</li>
|
|
<li><a href="namespace-None.html">None</a>
|
|
</li>
|
|
<li><a href="namespace-PHP.html">PHP</a>
|
|
</li>
|
|
<li class="active"><a href="namespace-Slim.html">Slim<span></span></a>
|
|
<ul>
|
|
<li><a href="namespace-Slim.Exception.html">Exception</a>
|
|
</li>
|
|
<li><a href="namespace-Slim.Http.html">Http</a>
|
|
</li>
|
|
<li><a href="namespace-Slim.Middleware.html">Middleware</a>
|
|
</li>
|
|
</ul></li>
|
|
<li><a href="namespace-utiliy.html">utiliy</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
|
|
<div id="elements">
|
|
<h3>Classes</h3>
|
|
<ul>
|
|
<li><a href="class-Slim.Environment.html">Environment</a></li>
|
|
<li><a href="class-Slim.Log.html">Log</a></li>
|
|
<li><a href="class-Slim.LogWriter.html">LogWriter</a></li>
|
|
<li><a href="class-Slim.Middleware.html">Middleware</a></li>
|
|
<li><a href="class-Slim.Route.html">Route</a></li>
|
|
<li><a href="class-Slim.Router.html">Router</a></li>
|
|
<li class="active"><a href="class-Slim.Slim.html">Slim</a></li>
|
|
<li><a href="class-Slim.View.html">View</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="splitter"></div>
|
|
|
|
<div id="right">
|
|
<div id="rightInner">
|
|
<form id="search">
|
|
<input type="hidden" name="cx" value="" />
|
|
<input type="hidden" name="ie" value="UTF-8" />
|
|
<input type="text" name="q" class="text" />
|
|
<input type="submit" value="Search" />
|
|
</form>
|
|
|
|
<div id="navigation">
|
|
<ul>
|
|
<li>
|
|
<a href="index.html" title="Overview"><span>Overview</span></a>
|
|
</li>
|
|
<li>
|
|
<a href="namespace-Slim.html" title="Summary of Slim"><span>Namespace</span></a>
|
|
</li>
|
|
<li class="active">
|
|
<span>Class</span> </li>
|
|
</ul>
|
|
<ul>
|
|
<li>
|
|
<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
|
|
</li>
|
|
</ul>
|
|
<ul>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="content" class="class">
|
|
<h1>Class Slim</h1>
|
|
|
|
|
|
<div class="description">
|
|
|
|
<p>Slim</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
<h4>Direct known subclasses</h4>
|
|
<a href="class-api.Api.html">api\Api</a>
|
|
</div>
|
|
|
|
<div>
|
|
<h4>Indirect known subclasses</h4>
|
|
<a href="class-api.PisApi.html">api\PisApi</a>,
|
|
<a href="class-api.PssApi.html">api\PssApi</a>,
|
|
<a href="class-api.SpsApi.html">api\SpsApi</a>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="info">
|
|
|
|
|
|
<b>Namespace:</b> <a href="namespace-Slim.html">Slim</a><br />
|
|
<b>Package:</b> Slim<br />
|
|
|
|
<b>Author:</b>
|
|
Josh Lockhart<br />
|
|
<b>Since:</b>
|
|
1.0.0<br />
|
|
<b>Located at</b> <a href="source-class-Slim.Slim.html#41-1309" title="Go to source code">thirdparty/Slim/Slim.php</a><br />
|
|
</div>
|
|
|
|
|
|
|
|
<table class="summary" id="methods">
|
|
<caption>Methods summary</caption>
|
|
<tr data-order="autoload" id="_autoload">
|
|
|
|
<td class="attributes"><code>
|
|
public static
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_autoload">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#132-158" title="Go to source code">autoload</a>( <span>mixed <var>$className</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Slim PSR-0 autoloader</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Slim PSR-0 autoloader</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="registerAutoloader" id="_registerAutoloader">
|
|
|
|
<td class="attributes"><code>
|
|
public static
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_registerAutoloader">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#160-166" title="Go to source code">registerAutoloader</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Register Slim's PSR-0 autoloader</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Register Slim's PSR-0 autoloader</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="__construct" id="___construct">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#___construct">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#172-208" title="Go to source code">__construct</a>( <span>array <var>$userSettings</var> = <span class="php-keyword1">array</span>()</span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Constructor</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Constructor</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$userSettings</var></dt>
|
|
<dd><code>array</code><br>$userSettings Associative array of application settings</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getInstance" id="_getInstance">
|
|
|
|
<td class="attributes"><code>
|
|
public static
|
|
Slim|null
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getInstance">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#210-218" title="Go to source code">getInstance</a>( <span>string <var>$name</var> = <span class="php-quote">'default'</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get application instance by name</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get application instance by name</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The name of the Slim application</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>Slim|null</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="setName" id="_setName">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_setName">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#220-228" title="Go to source code">setName</a>( <span>string <var>$name</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set Slim application name</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set Slim application name</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The name of this Slim application</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getName" id="_getName">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string|null
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getName">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#230-237" title="Go to source code">getName</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get Slim application name</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get Slim application name</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string|null</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getDefaultSettings" id="_getDefaultSettings">
|
|
|
|
<td class="attributes"><code>
|
|
public static
|
|
array
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getDefaultSettings">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#239-270" title="Go to source code">getDefaultSettings</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get default application settings</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get default application settings</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>array</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="config" id="_config">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
mixed
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_config">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#272-302" title="Go to source code">config</a>( <span>string|array <var>$name</var></span>, <span>mixed <var>$value</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Configure Slim Settings</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Configure Slim Settings</p>
|
|
|
|
<p>This method defines application settings and acts as a setter and a
|
|
getter.</p>
|
|
|
|
<p>If only one argument is specified and that argument is a string, the value of
|
|
the setting identified by the first argument will be returned, or NULL if that
|
|
setting does not exist.</p>
|
|
|
|
<p>If only one argument is specified and that argument is an associative array,
|
|
the array will be merged into the existing application settings.</p>
|
|
|
|
<p>If two arguments are provided, the first argument is the name of the setting
|
|
to be created or updated, and the second argument is the setting value.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string|array</code><br>$name If a string, the name of the setting to set or retrieve. Else an
|
|
associated array of setting names and values</dd>
|
|
<dt><var>$value</var></dt>
|
|
<dd><code>mixed</code><br>$value If name is a string, the value of the setting identified by $name</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>mixed</code><br>The value of a setting if only one argument is a string<br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getMode" id="_getMode">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getMode">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#308-333" title="Go to source code">getMode</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get application mode</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get application mode</p>
|
|
|
|
<p>This method determines the application mode. It first inspects the $_ENV
|
|
superglobal for key <code>SLIM_MODE</code>. If that is not found, it queries the
|
|
<code>getenv</code> function. Else, it uses the application <code>mode</code>
|
|
setting.</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="configureMode" id="_configureMode">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_configureMode">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#335-352" title="Go to source code">configureMode</a>( <span>string <var>$mode</var></span>, <span>mixed <var>$callable</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Configure Slim for a given mode</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Configure Slim for a given mode</p>
|
|
|
|
<p>This method will immediately invoke the callable if the specified mode
|
|
matches the current application mode. Otherwise, the callable is ignored. This
|
|
should be called only _after_ you initialize your Slim app.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$mode</var></dt>
|
|
<dd><code>string</code><br>$mode</dd>
|
|
<dt><var>$callable</var></dt>
|
|
<dd><code>mixed</code><br>$callable</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getLog" id="_getLog">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Log.html">Slim\Log</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getLog">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#358-365" title="Go to source code">getLog</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get application log</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get application log</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Log.html">Slim\Log</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="mapRoute" id="_mapRoute">
|
|
|
|
<td class="attributes"><code>
|
|
protected
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_mapRoute">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#371-411" title="Go to source code">mapRoute</a>( <span>array <var>$args</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add GET|POST|PUT|DELETE route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add GET|POST|PUT|DELETE route</p>
|
|
|
|
<p>Adds a new route to the router with associated callable. This route will only
|
|
be invoked when the HTTP request's method matches this route's method.</p>
|
|
|
|
<p>ARGUMENTS:</p>
|
|
|
|
<p>First: string The URL pattern (REQUIRED) In-Between: mixed Anything that
|
|
returns TRUE for <code>is_callable</code> (OPTIONAL) Last: mixed Anything that
|
|
returns TRUE for <code>is_callable</code> (REQUIRED)</p>
|
|
|
|
<p>The first argument is required and must always be the route pattern (ie.
|
|
'/books/:id').</p>
|
|
|
|
<p>The last argument is required and must always be the callable object to be
|
|
invoked when the route matches an HTTP request.</p>
|
|
|
|
<p>You may also provide an unlimited number of in-between arguments; each
|
|
interior argument must be callable and will be invoked in the order specified
|
|
before the route's callable is invoked.</p>
|
|
|
|
<p>USAGE:</p>
|
|
|
|
<p>Slim::get('/foo'[, middleware, middleware, ...], callable);</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$args</var></dt>
|
|
<dd><code>array</code><br>(See notes above)</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="map" id="_map">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_map">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#413-423" title="Go to source code">map</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add generic route without associated HTTP method</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add generic route without associated HTTP method</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
<h4>See</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Slim.html#_mapRoute">Slim\Slim::mapRoute()</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="get" id="_get">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_get">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#425-435" title="Go to source code">get</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add GET route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add GET route</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
<h4>See</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Slim.html#_mapRoute">Slim\Slim::mapRoute()</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="post" id="_post">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_post">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#437-447" title="Go to source code">post</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add POST route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add POST route</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
<h4>See</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Slim.html#_mapRoute">Slim\Slim::mapRoute()</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="put" id="_put">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_put">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#449-459" title="Go to source code">put</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add PUT route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add PUT route</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
<h4>See</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Slim.html#_mapRoute">Slim\Slim::mapRoute()</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="delete" id="_delete">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_delete">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#461-471" title="Go to source code">delete</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add DELETE route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add DELETE route</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
<h4>See</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Slim.html#_mapRoute">Slim\Slim::mapRoute()</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="options" id="_options">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Route.html">Slim\Route</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_options">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#473-483" title="Go to source code">options</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add OPTIONS route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add OPTIONS route</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Route.html">Slim\Route</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
<h4>See</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Slim.html#_mapRoute">Slim\Slim::mapRoute()</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="notFound" id="_notFound">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_notFound">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#485-518" title="Go to source code">notFound</a>( <span>mixed <var>$callable</var> = <span class="php-keyword1">null</span> </span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Not Found Handler</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Not Found Handler</p>
|
|
|
|
<p>This method defines or invokes the application-wide Not Found handler. There
|
|
are two contexts in which this method may be invoked:</p>
|
|
|
|
<p>1. When declaring the handler:</p>
|
|
|
|
<p>If the $callable parameter is not null and is callable, this method will
|
|
register the callable to be invoked when no routes match the current HTTP
|
|
request. It WILL NOT invoke the callable.</p>
|
|
|
|
<p>2. When invoking the handler:</p>
|
|
|
|
<p>If the $callable parameter is null, Slim assumes you want to invoke an
|
|
already-registered handler. If the handler has been registered and is callable,
|
|
it is invoked and sends a 404 HTTP Response whose body is the output of the Not
|
|
Found handler.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$callable</var></dt>
|
|
<dd><code>mixed</code><br>$callable Anything that returns true for is_callable()</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="error" id="_error">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_error">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#520-555" title="Go to source code">error</a>( <span>mixed <var>$argument</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Error Handler</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Error Handler</p>
|
|
|
|
<p>This method defines or invokes the application-wide Error handler. There are
|
|
two contexts in which this method may be invoked:</p>
|
|
|
|
<p>1. When declaring the handler:</p>
|
|
|
|
<p>If the $argument parameter is callable, this method will register the
|
|
callable to be invoked when an uncaught Exception is detected, or when otherwise
|
|
explicitly invoked. The handler WILL NOT be invoked in this context.</p>
|
|
|
|
<p>2. When invoking the handler:</p>
|
|
|
|
<p>If the $argument parameter is not callable, Slim assumes you want to invoke
|
|
an already-registered handler. If the handler has been registered and is
|
|
callable, it is invoked and passed the caught Exception as its one and only
|
|
argument. The error handler's output is captured into an output buffer and sent
|
|
as the body of a 500 HTTP Response.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$argument</var></dt>
|
|
<dd><code>mixed</code><br>$argument Callable|\Exception</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="callErrorHandler" id="_callErrorHandler">
|
|
|
|
<td class="attributes"><code>
|
|
protected
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_callErrorHandler">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#557-576" title="Go to source code">callErrorHandler</a>( <span><code><a href="class-Exception.html">Exception</a></code>|null <var>$argument</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Call error handler</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Call error handler</p>
|
|
|
|
<p>This will invoke the custom or default error handler and RETURN its
|
|
output.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$argument</var></dt>
|
|
<dd><code><code><a href="class-Exception.html">Exception</a></code>|null</code><br>$argument</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="environment" id="_environment">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Environment.html">Slim\Environment</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_environment">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#582-589" title="Go to source code">environment</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get a reference to the Environment object</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get a reference to the Environment object</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Environment.html">Slim\Environment</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="request" id="_request">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Http.Request.html">Slim\Http\Request</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_request">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#591-598" title="Go to source code">request</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get the Request object</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get the Request object</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Http.Request.html">Slim\Http\Request</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="response" id="_response">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Http.Response.html">Slim\Http\Response</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_response">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#600-607" title="Go to source code">response</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get the Response object</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get the Response object</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Http.Response.html">Slim\Http\Response</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="router" id="_router">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.Router.html">Slim\Router</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_router">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#609-616" title="Go to source code">router</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get the Router object</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get the Router object</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Router.html">Slim\Router</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="view" id="_view">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
<code><a href="class-Slim.View.html">Slim\View</a></code>
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_view">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#618-647" title="Go to source code">view</a>( <span>string|<code><a href="class-Slim.View.html">Slim\View</a></code> <var>$viewClass</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get and/or set the View</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get and/or set the View</p>
|
|
|
|
<p>This method declares the View to be used by the Slim application. If the
|
|
argument is a string, Slim will instantiate a new object of the same class. If
|
|
the argument is an instance of View or a subclass of View, Slim will use the
|
|
argument as the View.</p>
|
|
|
|
<p>If a View already exists and this method is called to create a new View, data
|
|
already set in the existing View will be transferred to the new View.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$viewClass</var></dt>
|
|
<dd><code>string|<code><a href="class-Slim.View.html">Slim\View</a></code></code><br>$viewClass The name or instance of a \Slim\View subclass</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.View.html">Slim\View</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="render" id="_render">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_render">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#653-673" title="Go to source code">render</a>( <span>string <var>$template</var></span>, <span>array <var>$data</var> = <span class="php-keyword1">array</span>()</span>, <span>integer <var>$status</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Render a template</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Render a template</p>
|
|
|
|
<p>Call this method within a GET, POST, PUT, DELETE, NOT FOUND, or ERROR
|
|
callable to render a template whose output is appended to the current HTTP
|
|
response body. How the template is rendered is delegated to the current
|
|
View.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$template</var></dt>
|
|
<dd><code>string</code><br>$template The name of the template passed into the view's render() method</dd>
|
|
<dt><var>$data</var></dt>
|
|
<dd><code>array</code><br>$data Associative array of data made available to the view</dd>
|
|
<dt><var>$status</var></dt>
|
|
<dd><code>integer</code><br>$status The HTTP response status code to use (optional)</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="lastModified" id="_lastModified">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_lastModified">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#679-702" title="Go to source code">lastModified</a>( <span>integer <var>$time</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set Last-Modified HTTP Response Header</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set Last-Modified HTTP Response Header</p>
|
|
|
|
<p>Set the HTTP 'Last-Modified' header and stop if a conditional GET request's
|
|
<code>If-Modified-Since</code> header matches the last modified time of the
|
|
resource. The <code>time</code> argument is a UNIX timestamp integer value. When
|
|
the current request includes an 'If-Modified-Since' header that matches the
|
|
specified last modified time, the application will stop and send a '304 Not
|
|
Modified' response to the client.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$time</var></dt>
|
|
<dd><code>integer</code><br>$time The last modified UNIX timestamp</dd>
|
|
</dl></div>
|
|
|
|
|
|
<h4>Throws</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-InvalidArgumentException.html">InvalidArgumentException</a></code></code><br>If provided timestamp is not an integer<br />
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="etag" id="_etag">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_etag">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#704-739" title="Go to source code">etag</a>( <span>string <var>$value</var></span>, <span>string <var>$type</var> = <span class="php-quote">'strong'</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set ETag HTTP Response Header</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set ETag HTTP Response Header</p>
|
|
|
|
<p>Set the etag header and stop if the conditional GET request matches. The
|
|
<code>value</code> argument is a unique identifier for the current resource. The
|
|
<code>type</code> argument indicates whether the etag should be used as a strong
|
|
or weak cache validator.</p>
|
|
|
|
<p>When the current request includes an 'If-None-Match' header with a matching
|
|
etag, execution is immediately stopped. If the request method is GET or HEAD, a
|
|
'304 Not Modified' response is sent.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$value</var></dt>
|
|
<dd><code>string</code><br>$value The etag value</dd>
|
|
<dt><var>$type</var></dt>
|
|
<dd><code>string</code><br>$type The type of etag to create; either "strong" or "weak"</dd>
|
|
</dl></div>
|
|
|
|
|
|
<h4>Throws</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-InvalidArgumentException.html">InvalidArgumentException</a></code></code><br>If provided type is invalid<br />
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="expires" id="_expires">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_expires">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#741-760" title="Go to source code">expires</a>( <span>string|integer <var>$time</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set Expires HTTP response header</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set Expires HTTP response header</p>
|
|
|
|
<p>The <code>Expires</code> header tells the HTTP client the time at which the
|
|
current resource should be considered stale. At that time the HTTP client will
|
|
send a conditional GET request to the server; the server may return a 200 OK if
|
|
the resource has changed, else a 304 Not Modified if the resource has not
|
|
changed. The <code>Expires</code> header should be used in conjunction with the
|
|
<code>etag()</code> or <code>lastModified()</code> methods above.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$time</var></dt>
|
|
<dd><code>string|integer</code><br>$time If string, a time to be parsed by <code>strtotime()</code>; If int, a UNIX
|
|
timestamp;</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="setCookie" id="_setCookie">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_setCookie">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#766-790" title="Go to source code">setCookie</a>( <span>string <var>$name</var></span>, <span>string <var>$value</var></span>, <span>integer|string <var>$time</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$path</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$domain</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$secure</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$httponly</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set unencrypted HTTP cookie</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set unencrypted HTTP cookie</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The cookie name</dd>
|
|
<dt><var>$value</var></dt>
|
|
<dd><code>string</code><br>$value The cookie value</dd>
|
|
<dt><var>$time</var></dt>
|
|
<dd><code>integer|string</code><br>$time The duration of the cookie; If integer, should be UNIX timestamp; If
|
|
string, converted to UNIX timestamp with <code>strtotime</code>;</dd>
|
|
<dt><var>$path</var></dt>
|
|
<dd><code>string</code><br>$path The path on the server in which the cookie will be available on</dd>
|
|
<dt><var>$domain</var></dt>
|
|
<dd><code>string</code><br>$domain The domain that the cookie is available to</dd>
|
|
<dt><var>$secure</var></dt>
|
|
<dd><code>boolean</code><br>$secure Indicates that the cookie should only be transmitted over a secure HTTPS
|
|
connection to/from the client</dd>
|
|
<dt><var>$httponly</var></dt>
|
|
<dd><code>boolean</code><br>$httponly When TRUE the cookie will be made accessible only through the HTTP
|
|
protocol</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getCookie" id="_getCookie">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string|null
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getCookie">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#792-805" title="Go to source code">getCookie</a>( <span>string <var>$name</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get value of unencrypted HTTP cookie</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get value of unencrypted HTTP cookie</p>
|
|
|
|
<p>Return the value of a cookie from the current HTTP request, or return NULL if
|
|
cookie does not exist. Cookies created during the current request will not be
|
|
available until the next request.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string|null</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="setEncryptedCookie" id="_setEncryptedCookie">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_setEncryptedCookie">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#807-835" title="Go to source code">setEncryptedCookie</a>( <span>string <var>$name</var></span>, <span>mixed <var>$value</var></span>, <span>mixed <var>$expires</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$path</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$domain</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$secure</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$httponly</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set encrypted HTTP cookie</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set encrypted HTTP cookie</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The cookie name</dd>
|
|
<dt><var>$value</var></dt>
|
|
<dd><code>mixed</code><br>$value The cookie value</dd>
|
|
<dt><var>$expires</var></dt>
|
|
<dd><code>mixed</code><br>$expires The duration of the cookie; If integer, should be UNIX timestamp; If
|
|
string, converted to UNIX timestamp with <code>strtotime</code>;</dd>
|
|
<dt><var>$path</var></dt>
|
|
<dd><code>string</code><br>$path The path on the server in which the cookie will be available on</dd>
|
|
<dt><var>$domain</var></dt>
|
|
<dd><code>string</code><br>$domain The domain that the cookie is available to</dd>
|
|
<dt><var>$secure</var></dt>
|
|
<dd><code>boolean</code><br>$secure Indicates that the cookie should only be transmitted over a secure HTTPS
|
|
connection from the client</dd>
|
|
<dt><var>$httponly</var></dt>
|
|
<dd><code>boolean</code><br>$httponly When TRUE the cookie will be made accessible only through the HTTP
|
|
protocol</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getEncryptedCookie" id="_getEncryptedCookie">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string|false
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getEncryptedCookie">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#837-860" title="Go to source code">getEncryptedCookie</a>( <span>string <var>$name</var></span>, <span>mixed <var>$deleteIfInvalid</var> = <span class="php-keyword1">true</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get value of encrypted HTTP cookie</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get value of encrypted HTTP cookie</p>
|
|
|
|
<p>Return the value of an encrypted cookie from the current HTTP request, or
|
|
return NULL if cookie does not exist. Encrypted cookies created during the
|
|
current request will not be available until the next request.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name</dd>
|
|
<dt><var>$deleteIfInvalid</var></dt>
|
|
<dd></dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string|false</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="deleteCookie" id="_deleteCookie">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_deleteCookie">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#862-886" title="Go to source code">deleteCookie</a>( <span>string <var>$name</var></span>, <span>string <var>$path</var> = <span class="php-keyword1">null</span></span>, <span>string <var>$domain</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$secure</var> = <span class="php-keyword1">null</span></span>, <span>boolean <var>$httponly</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Delete HTTP cookie (encrypted or unencrypted)</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Delete HTTP cookie (encrypted or unencrypted)</p>
|
|
|
|
<p>Remove a Cookie from the client. This method will overwrite an existing
|
|
Cookie with a new, empty, auto-expiring Cookie. This method's arguments must
|
|
match the original Cookie's respective arguments for the original Cookie to be
|
|
removed. If any of this method's arguments are omitted or set to NULL, the
|
|
default Cookie setting values (set during Slim::init) will be used instead.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The cookie name</dd>
|
|
<dt><var>$path</var></dt>
|
|
<dd><code>string</code><br>$path The path on the server in which the cookie will be available on</dd>
|
|
<dt><var>$domain</var></dt>
|
|
<dd><code>string</code><br>$domain The domain that the cookie is available to</dd>
|
|
<dt><var>$secure</var></dt>
|
|
<dd><code>boolean</code><br>$secure Indicates that the cookie should only be transmitted over a secure HTTPS
|
|
connection from the client</dd>
|
|
<dt><var>$httponly</var></dt>
|
|
<dd><code>boolean</code><br>$httponly When TRUE the cookie will be made accessible only through the HTTP
|
|
protocol</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="root" id="_root">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_root">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#892-905" title="Go to source code">root</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get the absolute path to this Slim application's root directory</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get the absolute path to this Slim application's root directory</p>
|
|
|
|
<p>This method returns the absolute path to the Slim application's directory. If
|
|
the Slim application is installed in a public-accessible sub-directory, the
|
|
sub-directory path will be included. This method will always return an absolute
|
|
path WITH a trailing slash.</p>
|
|
|
|
|
|
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="cleanBuffer" id="_cleanBuffer">
|
|
|
|
<td class="attributes"><code>
|
|
protected
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_cleanBuffer">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#907-915" title="Go to source code">cleanBuffer</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Clean current output buffer</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Clean current output buffer</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="stop" id="_stop">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_stop">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#917-928" title="Go to source code">stop</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Stop</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Stop</p>
|
|
|
|
<p>The thrown exception will be caught in application's <code>call()</code>
|
|
method and the response will be sent as is to the HTTP client.</p>
|
|
|
|
|
|
|
|
|
|
|
|
<h4>Throws</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Exception.Stop.html">Slim\Exception\Stop</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="halt" id="_halt">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_halt">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#930-948" title="Go to source code">halt</a>( <span>integer <var>$status</var></span>, <span>string <var>$message</var> = <span class="php-quote">''</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Halt</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Halt</p>
|
|
|
|
<p>Stop the application and immediately send the response with a specific status
|
|
and body to the HTTP client. This may send any type of response: info, success,
|
|
redirect, client error, or server error. If you need to render a template AND
|
|
customize the response status, use the application's <code>render()</code>
|
|
method instead.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$status</var></dt>
|
|
<dd><code>integer</code><br>$status The HTTP response status</dd>
|
|
<dt><var>$message</var></dt>
|
|
<dd><code>string</code><br>$message The HTTP response body</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="pass" id="_pass">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_pass">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#950-963" title="Go to source code">pass</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Pass</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Pass</p>
|
|
|
|
<p>The thrown exception is caught in the application's <code>call()</code>
|
|
method causing the router's current iteration to stop and continue to the
|
|
subsequent route if available. If no subsequent matching routes are found, a 404
|
|
response will be sent to the client.</p>
|
|
|
|
|
|
|
|
|
|
|
|
<h4>Throws</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-Slim.Exception.Pass.html">Slim\Exception\Pass</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="contentType" id="_contentType">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_contentType">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#965-972" title="Go to source code">contentType</a>( <span>string <var>$type</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set the HTTP response Content-Type</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set the HTTP response Content-Type</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$type</var></dt>
|
|
<dd><code>string</code><br>$type The Content-Type for the Response (ie. text/html)</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="status" id="_status">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_status">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#974-981" title="Go to source code">status</a>( <span>integer <var>$code</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set the HTTP response status code</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set the HTTP response status code</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$code</var></dt>
|
|
<dd><code>integer</code><br>$status The HTTP response status code</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="urlFor" id="_urlFor">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_urlFor">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#983-993" title="Go to source code">urlFor</a>( <span>string <var>$name</var></span>, <span>array <var>$params</var> = <span class="php-keyword1">array</span>()</span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get the URL for a named route</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get the URL for a named route</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The route name</dd>
|
|
<dt><var>$params</var></dt>
|
|
<dd><code>array</code><br>$params Associative array of URL parameters and replacement values</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string</code><br />
|
|
</div>
|
|
|
|
<h4>Throws</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-RuntimeException.html">RuntimeException</a></code></code><br>If named route does not exist<br />
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="redirect" id="_redirect">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_redirect">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#995-1011" title="Go to source code">redirect</a>( <span>string <var>$url</var></span>, <span>integer <var>$status</var> = <span class="php-num">302</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Redirect</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Redirect</p>
|
|
|
|
<p>This method immediately redirects to a new URL. By default, this issues a 302
|
|
Found response; this is considered the default generic redirect response. You
|
|
may also specify another valid 3xx status code if you want. This method will
|
|
automatically set the HTTP Location header for you using the URL parameter.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$url</var></dt>
|
|
<dd><code>string</code><br>$url The destination URL</dd>
|
|
<dt><var>$status</var></dt>
|
|
<dd><code>integer</code><br>$status The HTTP redirect status code (optional)</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="flash" id="_flash">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_flash">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1017-1027" title="Go to source code">flash</a>( <span>string <var>$key</var></span>, <span>mixed <var>$value</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set flash message for subsequent request</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set flash message for subsequent request</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$key</var></dt>
|
|
<dd><code>string</code><br>$key</dd>
|
|
<dt><var>$value</var></dt>
|
|
<dd><code>mixed</code><br>$value</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="flashNow" id="_flashNow">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_flashNow">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1029-1039" title="Go to source code">flashNow</a>( <span>string <var>$key</var></span>, <span>mixed <var>$value</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Set flash message for current request</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Set flash message for current request</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$key</var></dt>
|
|
<dd><code>string</code><br>$key</dd>
|
|
<dt><var>$value</var></dt>
|
|
<dd><code>mixed</code><br>$value</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="flashKeep" id="_flashKeep">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_flashKeep">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1041-1049" title="Go to source code">flashKeep</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Keep flash messages from previous request for subsequent request</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Keep flash messages from previous request for subsequent request</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="hook" id="_hook">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_hook">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1055-1069" title="Go to source code">hook</a>( <span>string <var>$name</var></span>, <span>mixed <var>$callable</var></span>, <span>integer <var>$priority</var> = <span class="php-num">10</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Assign hook</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Assign hook</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The hook name</dd>
|
|
<dt><var>$callable</var></dt>
|
|
<dd><code>mixed</code><br>$callable A callable object</dd>
|
|
<dt><var>$priority</var></dt>
|
|
<dd><code>integer</code><br>$priority The hook priority; 0 = high, 10 = low</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="applyHook" id="_applyHook">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_applyHook">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1071-1094" title="Go to source code">applyHook</a>( <span>string <var>$name</var></span>, <span>mixed <var>$hookArg</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Invoke hook</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Invoke hook</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name The hook name</dd>
|
|
<dt><var>$hookArg</var></dt>
|
|
<dd><code>mixed</code><br>$hookArgs (Optional) Argument for hooked functions</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="getHooks" id="_getHooks">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
array|null
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_getHooks">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1096-1114" title="Go to source code">getHooks</a>( <span>string <var>$name</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Get hook listeners</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Get hook listeners</p>
|
|
|
|
<p>Return an array of registered hooks. If <code>$name</code> is a valid hook
|
|
name, only the listeners attached to that hook are returned. Else, all listeners
|
|
are returned as an associative array whose keys are hook names and whose values
|
|
are arrays of listeners.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name A hook name (Optional)</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>array|null</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="clearHooks" id="_clearHooks">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_clearHooks">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1116-1134" title="Go to source code">clearHooks</a>( <span>string <var>$name</var> = <span class="php-keyword1">null</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Clear hook listeners</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Clear hook listeners</p>
|
|
|
|
<p>Clear all listeners for all hooks. If <code>$name</code> is a valid hook
|
|
name, only the listeners attached to that hook will be cleared.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$name</var></dt>
|
|
<dd><code>string</code><br>$name A hook name (Optional)</dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="add" id="_add">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_add">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1140-1153" title="Go to source code">add</a>( <span><code><a href="class-Slim.Middleware.html">Slim\Middleware</a></code> <var>$newMiddleware</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Add middleware</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Add middleware</p>
|
|
|
|
<p>This method prepends new middleware to the application middleware stack. The
|
|
argument must be an instance that subclasses Slim_Middleware.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$newMiddleware</var></dt>
|
|
<dd><code><code><a href="class-Slim.Middleware.html">Slim\Middleware</a></code></code></dd>
|
|
</dl></div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="run" id="_run">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_run">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1159-1201" title="Go to source code">run</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Run</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Run</p>
|
|
|
|
<p>This method invokes the middleware stack, including the core Slim
|
|
application; the result is an array of HTTP status, header, and body. These
|
|
three items are returned to the HTTP client.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="call" id="_call">
|
|
|
|
<td class="attributes"><code>
|
|
public
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_call">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1203-1250" title="Go to source code">call</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Call</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Call</p>
|
|
|
|
<p>This method finds and iterates all route objects that match the current
|
|
request URI.</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="handleErrors" id="_handleErrors">
|
|
|
|
<td class="attributes"><code>
|
|
public static
|
|
true
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_handleErrors">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1256-1277" title="Go to source code">handleErrors</a>( <span>integer <var>$errno</var></span>, <span>string <var>$errstr</var> = <span class="php-quote">''</span></span>, <span>string <var>$errfile</var> = <span class="php-quote">''</span></span>, <span>integer <var>$errline</var> = <span class="php-quote">''</span></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Convert errors into ErrorException objects</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Convert errors into ErrorException objects</p>
|
|
|
|
<p>This method catches PHP errors and converts them into \ErrorException
|
|
objects; these \ErrorException objects are then thrown and caught by Slim's
|
|
built-in or custom error handlers.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$errno</var></dt>
|
|
<dd><code>integer</code><br>$errno The numeric type of the Error</dd>
|
|
<dt><var>$errstr</var></dt>
|
|
<dd><code>string</code><br>$errstr The error message</dd>
|
|
<dt><var>$errfile</var></dt>
|
|
<dd><code>string</code><br>$errfile The absolute path to the affected file</dd>
|
|
<dt><var>$errline</var></dt>
|
|
<dd><code>integer</code><br>$errline The line number of the error in the affected file</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>true</code><br />
|
|
</div>
|
|
|
|
<h4>Throws</h4>
|
|
<div class="list">
|
|
<code><code><a href="class-ErrorException.html">ErrorException</a></code></code><br />
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="generateTemplateMarkup" id="_generateTemplateMarkup">
|
|
|
|
<td class="attributes"><code>
|
|
protected static
|
|
string
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_generateTemplateMarkup">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1279-1291" title="Go to source code">generateTemplateMarkup</a>( <span>string <var>$title</var></span>, <span>string <var>$body</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Generate diagnostic template markup</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Generate diagnostic template markup</p>
|
|
|
|
<p>This method accepts a title and body content to generate an HTML document
|
|
layout.</p>
|
|
|
|
|
|
|
|
<h4>Parameters</h4>
|
|
<div class="list"><dl>
|
|
<dt><var>$title</var></dt>
|
|
<dd><code>string</code><br>$title The title of the HTML template</dd>
|
|
<dt><var>$body</var></dt>
|
|
<dd><code>string</code><br>$body The body content of the HTML template</dd>
|
|
</dl></div>
|
|
|
|
<h4>Returns</h4>
|
|
<div class="list">
|
|
<code>string</code><br />
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="defaultNotFound" id="_defaultNotFound">
|
|
|
|
<td class="attributes"><code>
|
|
protected
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_defaultNotFound">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1293-1299" title="Go to source code">defaultNotFound</a>( )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Default Not Found handler</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Default Not Found handler</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="defaultError" id="_defaultError">
|
|
|
|
<td class="attributes"><code>
|
|
protected
|
|
|
|
|
|
</code>
|
|
</td>
|
|
|
|
<td class="name"><div>
|
|
<a class="anchor" href="#_defaultError">#</a>
|
|
<code><a href="source-class-Slim.Slim.html#1301-1308" title="Go to source code">defaultError</a>( <span>mixed <var>$e</var></span> )</code>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Default Error handler</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Default Error handler</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<table class="summary" id="constants">
|
|
<caption>Constants summary</caption>
|
|
<tr data-order="VERSION" id="VERSION">
|
|
|
|
<td class="attributes"><code>string</code></td>
|
|
<td class="name"><code>
|
|
<a href="source-class-Slim.Slim.html#49-52" title="Go to source code"><b>VERSION</b></a>
|
|
</code></td>
|
|
<td class="value"><code><span class="php-quote">'2.2.0'</span></code></td>
|
|
<td class="description"><div>
|
|
<a href="#VERSION" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
<h4>Const</h4>
|
|
<div class="list">
|
|
string<br />
|
|
</div>
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<table class="summary" id="properties">
|
|
<caption>Properties summary</caption>
|
|
<tr data-order="apps" id="$apps">
|
|
<td class="attributes"><code>
|
|
protected static
|
|
array[\Slim]
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#54-57" title="Go to source code"><var>$apps</var></a>
|
|
</td>
|
|
<td class="value"><code><span class="php-keyword1">array</span>()</code></td>
|
|
<td class="description"><div>
|
|
<a href="#$apps" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="name" id="$name">
|
|
<td class="attributes"><code>
|
|
protected
|
|
string
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#59-62" title="Go to source code"><var>$name</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$name" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="environment" id="$environment">
|
|
<td class="attributes"><code>
|
|
protected
|
|
array
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#64-67" title="Go to source code"><var>$environment</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$environment" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="request" id="$request">
|
|
<td class="attributes"><code>
|
|
protected
|
|
<code><a href="class-Slim.Http.Request.html">Slim\Http\Request</a></code>
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#69-72" title="Go to source code"><var>$request</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$request" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="response" id="$response">
|
|
<td class="attributes"><code>
|
|
protected
|
|
<code><a href="class-Slim.Http.Response.html">Slim\Http\Response</a></code>
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#74-77" title="Go to source code"><var>$response</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$response" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="router" id="$router">
|
|
<td class="attributes"><code>
|
|
protected
|
|
<code><a href="class-Slim.Router.html">Slim\Router</a></code>
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#79-82" title="Go to source code"><var>$router</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$router" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="view" id="$view">
|
|
<td class="attributes"><code>
|
|
protected
|
|
<code><a href="class-Slim.View.html">Slim\View</a></code>
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#84-87" title="Go to source code"><var>$view</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$view" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="settings" id="$settings">
|
|
<td class="attributes"><code>
|
|
protected
|
|
array
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#89-92" title="Go to source code"><var>$settings</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$settings" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="mode" id="$mode">
|
|
<td class="attributes"><code>
|
|
protected
|
|
string
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#94-97" title="Go to source code"><var>$mode</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$mode" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="middleware" id="$middleware">
|
|
<td class="attributes"><code>
|
|
protected
|
|
array
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#99-102" title="Go to source code"><var>$middleware</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$middleware" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="error" id="$error">
|
|
<td class="attributes"><code>
|
|
protected
|
|
mixed
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#104-107" title="Go to source code"><var>$error</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$error" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Callable to be invoked if application error</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Callable to be invoked if application error</p>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="notFound" id="$notFound">
|
|
<td class="attributes"><code>
|
|
protected
|
|
mixed
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#109-112" title="Go to source code"><var>$notFound</var></a>
|
|
</td>
|
|
<td class="value"><code></code></td>
|
|
<td class="description"><div>
|
|
<a href="#$notFound" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
<p>Callable to be invoked if no matching routes are found</p>
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
<p>Callable to be invoked if no matching routes are found</p>
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
<tr data-order="hooks" id="$hooks">
|
|
<td class="attributes"><code>
|
|
protected
|
|
array
|
|
</code></td>
|
|
|
|
<td class="name">
|
|
<a href="source-class-Slim.Slim.html#114-124" title="Go to source code"><var>$hooks</var></a>
|
|
</td>
|
|
<td class="value"><code><span class="php-keyword1">array</span>(
|
|
<span class="php-quote">'slim.before'</span> => <span class="php-keyword1">array</span>(<span class="php-keyword1">array</span>()),
|
|
<span class="php-quote">'slim.before.router'</span> => <span class="php-keyword1">array</span>(<span class="php-keyword1">array</span>()),
|
|
<span class="php-quote">'slim.before.dispatch'</span> => <span class="php-keyword1">array</span>(<span class="php-keyword1">array</span>()),
|
|
<span class="php-quote">'slim.after.dispatch'</span> => <span class="php-keyword1">array</span>(<span class="php-keyword1">array</span>()),
|
|
<span class="php-quote">'slim.after.router'</span> => <span class="php-keyword1">array</span>(<span class="php-keyword1">array</span>()),
|
|
<span class="php-quote">'slim.after'</span> => <span class="php-keyword1">array</span>(<span class="php-keyword1">array</span>())
|
|
)</code></td>
|
|
<td class="description"><div>
|
|
<a href="#$hooks" class="anchor">#</a>
|
|
|
|
<div class="description short">
|
|
|
|
</div>
|
|
|
|
<div class="description detailed hidden">
|
|
|
|
|
|
</div>
|
|
</div></td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
GeoApi API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|