\CommonApplication

Common application with any available template.

Summary

Methods
Properties
Constants
__construct()
load_route()
load_routes()
load_routes_from_config()
handle_exception()
run()
__call()
redirect_to()
cross_render()
get_template()
set_template()
No public properties found
No constants found
call_route()
format_call_stack()
$Router
$Template
N/A
No private methods found
No private properties found
N/A

Properties

$Router

$Router : 

Router object.

Type

$Template

$Template : 

Application's template.

Type

Methods

__construct()

__construct(  $Template) 

Constructor.

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

handle_exception()

handle_exception(\Exception  $e) 

Method processes exception.

Parameters

\Exception $e
  • Exception object.

run()

run() 

Running application.

__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

cross_render()

cross_render() : array

Method renders common parts of all pages.

Returns

array —

List of common parts.

get_template()

get_template() 

Getting template.

set_template()

set_template(  $Template) 

Setting template.

Parameters

$Template

call_route()

call_route() 

Method calls route and returns it's content.

format_call_stack()

format_call_stack(  $e) 

Formatting call stack.

Parameters

$e