Skip to content

Commit 9e5e54a

Browse files
committed
Add composer information to README.md
1 parent 423cd78 commit 9e5e54a

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@ The main objective for this Router is to organize the possible routes in a hiera
33
although you are free to implement a different organization/data structure such as arrays with one or multiple
44
dimensions.
55

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+
640
# Brief summary of Objects/Classes
741
Here are some objects that will help you initialize your router:
842

@@ -31,7 +65,7 @@ the action according to the supplied method. This object is also responsible for
3165

3266
# How to use
3367

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.
3569
```php
3670
include 'Autoload.php'
3771

0 commit comments

Comments
 (0)