intro http abstraction
This commit is contained in:
parent
b9a900574d
commit
cb5a00e822
2 changed files with 11 additions and 2 deletions
11
2-http.md
11
2-http.md
|
@ -53,4 +53,13 @@ $woops->register();
|
|||
|
||||
throw new \Exception;
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
You should now see a nice error page with the line highlighted where you throw the exception. If not, go back and debug until you get it working. Now would also be a good time for another commit.
|
||||
|
||||
### HTTP abstractions
|
||||
|
||||
PHP already has a few things built in to make working with HTTP easier. For example there are the [superglobals](http://php.net/manual/en/language.variables.superglobals.php) that contain the request information.
|
||||
|
||||
These are good if you just want to get a quick and dirty script runnin. But if you want to write clean, maintanable, [SOLID](http://en.wikipedia.org/wiki/SOLID_%28object-oriented_design%29) code, then you will want a class with a nice object oriented interface that you can use in your application.
|
||||
|
||||
|
|
|
@ -11,4 +11,4 @@ So let's get started right away with the [setup](1-setup.md).
|
|||
### Parts
|
||||
|
||||
* [1. Setting up the project](1-setup.md).
|
||||
* [2. Http abstraction](2-http.md).
|
||||
* [2. HTTP abstraction](2-http.md).
|
Loading…
Reference in a new issue