Skip to content

Commit 33bcc63

Browse files
author
Alex Ermashev
committed
add new docs
1 parent 6f06d25 commit 33bcc63

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

docs/index.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ Run the following to install this library:
1818
Request
1919
-------
2020

21-
The Request object is responsible for managing the input state both in the `HTTP` and `CLI` modes.
21+
The :code:`Request` object is responsible for managing the input state both in the `HTTP` and `CLI` modes.
2222
It provides an abstraction layer for getting input data like: a current request and the request's method.
2323

24-
**Let consider an example for the HTTP mode:**
24+
------------
25+
HTTP example
26+
------------
2527

2628
.. code-block:: php
2729
@@ -37,11 +39,13 @@ It provides an abstraction layer for getting input data like: a current request
3739
echo $request->getRequest(); // prints the current request like: "/", "/users", "/documents/view", etc
3840
echo $request->getMethod(); // prints the current method like: "GET", "POST", "DELETE", etc
3941
40-
PS: The **RequestHttpParams** ignores any http `GET` parameters and returns only the request's path.
41-
E.g **/users/?param=1** would be **/users**, also it removes sub directory path - **sub_directory/users/** would be **/users**, it very
42+
PS: The :code:`RequestHttpParams` ignores any http `GET` parameters and returns only the request's path.
43+
E.g :code:`/users/?param=1` would be :code:`/users`, also it removes sub directory path - :code:`sub_directory/users/` would be just :code:`/users`, it very
4244
helpful for the routing handling.
4345

44-
**Let consider an example for the CLI mode:**
46+
-----------
47+
CLI example
48+
-----------
4549

4650
.. code-block:: php
4751
@@ -59,7 +63,11 @@ helpful for the routing handling.
5963
6064
// example of calling: php index.php user import 1
6165
62-
**We even can create a universal way for handling requests, and don't care if it CLI or HTTP mode**
66+
-----------------
67+
Universal example
68+
-----------------
69+
70+
In this case we don't really care about the current mode, we just work with the abstraction.
6371

6472
.. code-block:: php
6573

0 commit comments

Comments
 (0)