Skip to content

Commit e9af6c2

Browse files
author
Niels Theen
committed
Update README with strategy descriptions
1 parent d704df1 commit e9af6c2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Creating [ReactPHP HTTP Server](https://github.com/reactphp/http) but with REST
99
* [Server](#server)
1010
* [Dynamic Values](#dynamic-values)
1111
* [Default Callback](#default-callback)
12+
* [Parameter Placeholder](#parameter-placholder)
1213
* [Install](#install)
1314
* [License](#license)
1415

@@ -81,6 +82,19 @@ This method will be used if no definition can be found.
8182

8283
By default this library will respond with an `404` HTTP response.
8384

85+
### Parameter Placeholder
86+
87+
As seen in the previous chapter you can use the `:` to mark
88+
dynamic values.
89+
Instead of using this strategy, to mark dynamic parameters,
90+
this library supports additional strategies via different classes:
91+
92+
* `/to/path/:paramter` - `Legionth\React\Http\Rest\Paramaters\Label\Colon`
93+
* `/to/path/[paramter]` - `Legionth\React\Http\Rest\Paramaters\Label\CurlyBracket`
94+
* `/to/path/{paramter}` - `Legionth\React\Http\Rest\Paramaters\Label\SquareBrackets`
95+
96+
Checkout the examples for more information.
97+
8498
## Install
8599

86100
The recommended way to install this library is [through Composer](https://getcomposer.org).

0 commit comments

Comments
 (0)