-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
80 lines (52 loc) · 2.28 KB
/
Copy pathindex.php
File metadata and controls
80 lines (52 loc) · 2.28 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/**
* Front Controller
* PHP version 7
*
* @category Controller
* @package Front Controller
* @author Bill Rocha <prbr@ymail.com>
* @copyright 2016 Bill Rocha <http://google.com/+BillRocha>
* @license <https://opensource.org/licenses/MIT> MIT
* @version 0.0.1
* @link http://dbrasil.tk/devbr
*/
//Setup and mount Application
//include '.php/App.php';
//$test = App::this()->start();
(include '.php/App.php')->start(); //initialize Application
(new Devbr\Router)->run(); //mount and running router
/*
//$teste = new Config\Test('item 1', 'item 2');
echo '<br><b>GetPar: </b>'.Config\Test::this('teste---')->getPar();
echo '<br><b>GetParams: </b><pre>'.print_r(Config\Test::this('teste---')->get(), true).'</pre>';
echo '<br><b>GetParams(public): </b><pre>'.print_r(Config\Test::this('teste---')->get('public'), true).'</pre>';
Config\Test::this()->set('public', 'novo valor');
echo '<br><b>GetParams(array): </b><pre>'.print_r(Config\Test::this('teste---')->get(['parametro', 'public','protected','node']), true).'</pre>';
Config\Test::this()->set(['public'=>'Array public', 'protected'=>'Array protected']);
echo '<br><b>GetParams(array): </b><pre>'.print_r(Config\Test::this('teste---')->get(['parametro', 'public','protected','node']), true).'</pre>';
// ------------------------------- Test2
Config\Test2::this()->set('public', 'Test2');
echo '<hr><pre>'.print_r(Config\Test2::$node, true).'</pre>';
echo '<hr><pre>'.print_r(Config\Test2::$node['Config\Test2']->public, true).'</pre>';
Config\Test2::this()->set(['public'=>'Test2-123', 'protected'=>'Test2-protegido']);
echo '<br><b>GetParams: </b><pre>'.print_r(Config\Test2::this()->get(), true).'</pre>';
class XXX
{
protected $protected = 'Class - protected';
public $public = 'Class - public';
private $private = 'Class - private';
function tClass()
{
echo '<br><b>CLASS ---- </b><br>';
}
}
Config\Test2::this()->set(new xxx);
echo '<br><b>GetParams: </b><pre>'.print_r(Config\Test2::this()->get(), true).'</pre>';
exit('<hr>Finished!<pre>'.print_r($teste, true));
//Route detection and controller call
//Devbr\Router::this()->run();
/*
Optimize your application before putting it into production mode with the following command:
"composer dump-autoload --optimize"
*/