Properties

$title

$title : 

The <title> tag's content

Type

$response

$response : 

The Symfony Response object

Type

$pageContent

$pageContent : 

Page's content

Type

Methods

__constructStatic()

__constructStatic() 

Set up class

setStatusCode()

setStatusCode(integer  $status) 

Set the status code of response

Parameters

integer $status

The status code

header()

header() : \ResponseHeaderBag

Modify header

Returns

\ResponseHeaderBag —

Symfony object

setCache()

setCache(array  $options) 

Set cache headers

Parameters

array $options

Cache options

setContent()

setContent(string  $content) 

Set the response body

Parameters

string $content

The response body to set

setPage()

setPage(string  $content) 

Set the page content.

Pass the contents that should be inserted in #workspace tag inside .

Parameters

string $content

The page's HTML

getFile()

getFile(string  $location, string  $vars = array()) : string

Run a (PHP) file and get the response of it.

Parameters

string $location

Path to file

string $vars

Variables that need to be passed to file

Returns

string —

The response of executed script

loadContent()

loadContent(string  $location) 

Set the content by loading a file

Parameters

string $location

Path to file

loadPage()

loadPage(string  $location) 

Set the page content by loading a file

Parameters

string $location

Path to file

getContent()

getContent() : string|null

Get the response body

Returns

string|null —

The response body

getPageContent()

getPageContent() : string|null

Get the page response

Returns

string|null —

The page's HTML

hasContent()

hasContent() : boolean

Whether response body is set

Returns

boolean

showError()

showError(string  $title = null, string  $description = null) 

Display a plain error page.

If $title and $content is not null, status code will be 500, else 404

The respons will be sent and script execution will be stopped if this function is called.

Parameters

string $title

Error name

string $description

Error description

send()

send() 

Send response

head()

head(string  $title = "") 

Make and print the <head> tag

Parameters

string $title

The content of tag</p></td> </tr> </table> </article> </div> <aside class="span4 detailsbar"> <h1><i class="icon-arrow-down"></i></h1> <span class="label label-info">static</span> <dl> </dl> <h2>Tags</h2> <table class="table table-condensed"> <tr><td colspan="2"><em>None found</em></td></tr> </table> </aside> </div> <div class="row-fluid"> <div class="span8 content class"> <a id="method_setTitle" name="method_setTitle" class="anchor"></a> <article class="method"> <h3 class="public ">setTitle()</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;">setTitle(string <span class="argument">$title = ""</span>) : string</pre> <p><em>Set the content of <title> tag</em></p> <h4>Parameters</h4> <table class="table table-condensed table-hover"> <tr> <td>string</td> <td>$title </td> <td></td> </tr> </table> <h4>Returns</h4> string </article> </div> <aside class="span4 detailsbar"> <h1><i class="icon-arrow-down"></i></h1> <span class="label label-info">static</span> <dl> </dl> <h2>Tags</h2> <table class="table table-condensed"> <tr><td colspan="2"><em>None found</em></td></tr> </table> </aside> </div> <div class="row-fluid"> <div class="span8 content class"> <a id="method_redirect" name="method_redirect" class="anchor"></a> <article class="method"> <h3 class="public ">redirect()</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;">redirect(string <span class="argument">$url</span>, string <span class="argument">$status = 302</span>) </pre> <p><em>Do a redirect</em></p> <h4>Parameters</h4> <table class="table table-condensed table-hover"> <tr> <td>string</td> <td>$url </td> <td><p>URL to redirect to. Can be relative to Lobby</p></td> </tr> <tr> <td>string</td> <td>$status </td> <td><p>Status code to use. 302 means moved temporarily</p></td> </tr> </table> </article> </div> <aside class="span4 detailsbar"> <h1><i class="icon-arrow-down"></i></h1> <span class="label label-info">static</span> <dl> </dl> <h2>Tags</h2> <table class="table table-condensed"> <tr><td colspan="2"><em>None found</em></td></tr> </table> </aside> </div> </div> </section> <div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="source-view-label">Response.php</h3> </div> <div class="modal-body"> <pre data-src="../files/Response.php.txt" class="language-php line-numbers"></pre> </div> </div> <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> <li><a href="../namespaces/Lobby.html">\Lobby</a></li> </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 November 14th, 2016 at 12:50. </section> </section> </section> </footer> </div> </body> </html>