File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,40 @@ The main objective for this Router is to organize the possible routes in a hiera
3
3
although you are free to implement a different organization/data structure such as arrays with one or multiple
4
4
dimensions.
5
5
6
+ # Installing
7
+ The router can be installed through composer although at the moment it's not available through packagist. So you'll
8
+ have to specify the repository in the composer.json.
9
+
10
+ ``` json
11
+ {
12
+ "repositories" : [
13
+ {
14
+ "type" : " vcs" ,
15
+ "url" : " https://github.com/minusfour/phptreebasedrouter"
16
+ }
17
+ ],
18
+ "require" :
19
+ {
20
+ "minusfour/phptreebasedrouter" : " dev-master"
21
+ }
22
+ }
23
+ ```
24
+
25
+ After that you'll have to install the dependencies:
26
+
27
+ ``` bash
28
+ composer install
29
+ ```
30
+
31
+ If no composer is available you can are free to download the sources from github through your preferred way. If you
32
+ are using composer please remember to include composer autoloader.
33
+
34
+ ``` php
35
+ require 'vendor/autoload.php'
36
+ ```
37
+
38
+ Otherwise, you are free to use the autoloder file included in the root of this project or to implement your own autoloader.
39
+
6
40
# Brief summary of Objects/Classes
7
41
Here are some objects that will help you initialize your router:
8
42
@@ -31,7 +65,7 @@ the action according to the supplied method. This object is also responsible for
31
65
32
66
# How to use
33
67
34
- Start by including the autoloader and setting up the classes:
68
+ Start by including the autoloader (no need to do so if you are using composer) and setting up the classes.
35
69
``` php
36
70
include 'Autoload.php'
37
71
You can’t perform that action at this time.
0 commit comments