-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomeController.php
More file actions
40 lines (30 loc) · 868 Bytes
/
HomeController.php
File metadata and controls
40 lines (30 loc) · 868 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
* Created by PhpStorm.
* User: daedeloth
* Date: 29/11/14
* Time: 13:06
*/
namespace Example\Controllers;
use Neuron\Config;
use Neuron\Core\Template;
use Neuron\Net\Response;
class HomeController {
public function main ()
{
$template = new Template ('example.phpt');
$template->set ('title', Config::get ('app.name'));
$template->set ('first', Config::get ('app.example.first'));
$template->set ('second', Config::get ('app.example.second'));
$template->set ('third', Config::get ('app.example.third'));
$template->set ('counts', Config::get ('app.example'));
return Response::template ($template);
}
public function templates ()
{
Template::addPath ('lowpriority', '', -5);
Template::addPath ('regularpriority', '', 0);
Template::addPath ('highpriority', '', 5);
return Response::table (Template::getPaths());
}
}