\LobbyRouter

The Router class for Routing paths coming to Lobby accordingly Klein is used as the Routing Library, so Route names and others will be as Klein's : https://github.com/chriso/klein.php

Summary

Methods
Properties
Constants
__constructStatic()
route()
dispatch()
defaults()
serveFile()
$router
No constants found
No protected methods found
No protected properties found
N/A
getServeFileAbsolutePath()
No private properties found
N/A

Properties

$router

$router : \Klein\Klein

Klein router object

Type

\Klein\Klein

Methods

__constructStatic()

__constructStatic() 

Set up

route()

route(string  $route, string  $callback) 

Set a route

Parameters

string $route

The route path

string $callback

Function to handle the route

dispatch()

dispatch() : boolean

Dispatch all routes and send response.

All routes are ran and if there is content, a response is sent.

If it's a request to a native file, FALSE is returned.

Returns

boolean —

Whether a route is set to handle this request

defaults()

defaults() 

Default routes and settings

serveFile()

serveFile() : boolean

Process & serve files

Returns

boolean —

Whether a file was served

getServeFileAbsolutePath()

getServeFileAbsolutePath(string  $path) : boolean

Make HTTP requested path to absolute location

Parameters

string $path

Requested file path

Returns

boolean —

Whether the request points to a valid file