Browse code

Serialization and ViewEngines basics

Rafał Szklarczyk authored on 06/06/2019 20:03:48
Showing 1 changed files
... ...
@@ -26,4 +26,8 @@ class Config{
26 26
     public function getViewsDirectory(){
27 27
         return "views";
28 28
     }
29
+
30
+    public function configure($_L3){
31
+        // function to be overriden
32
+    }
29 33
 }
30 34
\ No newline at end of file
Browse code

Config Class development

Rafał Szklarczyk authored on 22/05/2019 20:57:16
Showing 1 changed files
... ...
@@ -10,4 +10,20 @@ class Config{
10 10
     public function getRouting(){
11 11
         return new \app\config\routing();
12 12
     }
13
+
14
+    public function getBaseDirectory(){
15
+        return _L3_BASE_PATH;
16
+    }
17
+
18
+    public function getApplicationDirectory(){
19
+        return "app";
20
+    }
21
+
22
+    public function getControllersDirectory(){
23
+        return "controllers";
24
+    }
25
+
26
+    public function getViewsDirectory(){
27
+        return "views";
28
+    }
13 29
 }
14 30
\ No newline at end of file
Browse code

Config bug fix

Rafał Szklarczyk authored on 22/05/2019 19:53:14
Showing 1 changed files
... ...
@@ -8,6 +8,6 @@ class Config{
8 8
     }
9 9
 
10 10
     public function getRouting(){
11
-        return new app\config\routing();
11
+        return new \app\config\routing();
12 12
     }
13 13
 }
14 14
\ No newline at end of file
Browse code

PSR-4 based app config + routing

Rafał Szklarczyk authored on 22/05/2019 19:45:49
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,13 @@
1
+<?php
2
+
3
+namespace elanpl\L3;
4
+
5
+class Config{
6
+    public function getRequest(){
7
+        return new Request();
8
+    }
9
+
10
+    public function getRouting(){
11
+        return new app\config\routing();
12
+    }
13
+}
0 14
\ No newline at end of file