Properties

$Template

$Template : 

Application's template.

Type

$Router

$Router : 

Router object.

Type

Methods

__construct()

__construct() 

Constructor.

cross_render()

cross_render() : array

Method renders common parts of all pages.

Returns

array —

List of common parts.

handle_exception()

handle_exception(\Exception  $e) 

Method processes exception.

Parameters

\Exception $e
  • Exception object.

run()

run() 

Running application.

get_template()

get_template() 

Getting template.

set_template()

set_template(  $Template) 

Setting template.

Parameters

$Template

load_route()

load_route(  $Route) 

Method loads single route.

Parameters

$Route

load_routes()

load_routes(  $Routes) 

Method loads routes.

Parameters

$Routes

load_routes_from_config()

load_routes_from_config(  $Path = './conf/routes.php') 

Method loads routes from config file.

Parameters

$Path

__call()

__call(  $Method,   $Args) 

Allowing to call methods added on the fly.

Parameters

$Method
$Args

redirect_to()

redirect_to(  $URL) 

Method redirects user to another page.

Parameters

$URL

get_session_id()

get_session_id() 

Method returns session id from HTTP header.

response()

response(  $ResponseData) : array

Method compiles responce.

Parameters

$ResponseData

- data to be wrapped in response object.

Returns

array —

Response object.

format_call_stack()

format_call_stack(  $e) 

Formatting call stack.

Parameters

$e

call_route()

call_route() 

Method calls route and returns it's content.

get_session_id_from_headers()

get_session_id_from_headers(  $Headers) 

Fetching auth token from headers.

Parameters

$Headers