File tree Expand file tree Collapse file tree 7 files changed +67
-1
lines changed Expand file tree Collapse file tree 7 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 11RewriteEngine on
2+
3+
4+ #RewriteCond %{REQUEST_URI} ^/i/
5+ #RewriteCond %{REQUEST_FILENAME} !-f
6+ #RewriteRule .* image.php [L]
7+
8+
9+
10+ RewriteCond %{REQUEST_URI} !/(public|Favicon)/
211RewriteCond %{REQUEST_FILENAME} !-f
312RewriteCond %{REQUEST_FILENAME} !-d
4- RewriteRule ^(.*) index.php?url=$1 [L,QSA]
13+ RewriteRule ^(.*) index.php?url=$1 [L,QSA]
14+
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Created by PhpStorm.
4+ * User: dawid
5+ * Date: 29.07.18
6+ * Time: 15:11
7+ */
8+
9+ namespace Tools ;
10+
11+
12+ final class Config {
13+ private static $ instance ;
14+
15+ private static $ _configs = [];
16+
17+ public static function getInstance (): self {
18+ if (self ::$ instance === null ) {
19+ self ::$ instance = new Config ();
20+ }
21+ return self ::$ instance ;
22+ }
23+
24+ public static function __get (?string $ name ) {
25+
26+ if ($ name ){
27+ if (array_key_exists ($ name , self ::$ _configs )){
28+ return self ::$ _configs [$ name ];
29+ }
30+ }
31+
32+ return self ::$ _configs ;
33+ }
34+
35+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Created by PhpStorm.
4+ * User: dawid
5+ * Date: 10.07.18
6+ * Time: 21:38
7+ */
8+
9+ namespace View ;
10+
11+
12+ class Templater {
13+
14+ }
Original file line number Diff line number Diff line change 1+ {
2+
3+ }
Original file line number Diff line number Diff line change 22
33namespace Controllers ;
44
5+ use Tools \Config ;
6+
57class HelloController extends \Engine \Controller {
68
79 public function index () {
Original file line number Diff line number Diff line change 1616 "autoload" : {
1717 "psr-4" : {
1818 "View\\ " : " Engine/View" ,
19+ "Tools\\ " : " Engine/Tools" ,
1920 "Engine\\ " : " Engine" ,
2021 "Controllers\\ " : " application/controller"
2122 }
Original file line number Diff line number Diff line change 11<?php
2+ //error_reporting(E_ALL);
23error_reporting (-1 );
34ini_set ('display_errors ' , 'Off ' );
45
You can’t perform that action at this time.
0 commit comments