Skip to content

Commit

Permalink
Add install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsonswy authored Aug 7, 2021
1 parent 1ea5a3a commit 3f426a6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ A simple PHP framework providing utilities for
## Usage
This framework is most easily integrated into an environment using the PSR-4 naming standard with class auto-loading.

Add this repo to the `repositories` section of your `composer.json`.
```json
"repositories": [
{
"type": "vcs",
"url": "https://github.com/peacefulcraft-network/api-router"
}
]
```

Install the library
```
composer require pcn/api-router
```

### Routing
```php
ob_start();
Expand Down Expand Up @@ -69,4 +84,4 @@ The $Response->setData() call can be used to set what data is sent back by the a

Alternativly, $Response->setResponseTypeRaw(true); will disable all framework output and a response can be crafted using standard PHP echo / print calls. Appropriate headers may need to be set for 'Content-Type' by hand. Technically anything can be 'echo'ed at anytime, regardless of setResponseTypeRaw(), but this output will also contain the framework output. Generally this is only useful for 'echo'ing out debug information and in production you'll just want to use the Router with your own templating system, or utilize the built in setData() method.
*/
```
```

0 comments on commit 3f426a6

Please sign in to comment.