Recommend this page to a friend! |
Classes of Murat Cileli | Papernic | vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/README.md | Download |
|
DownloadHttpFoundation ComponentHttpFoundation defines an object-oriented layer for the HTTP specification. It provides an abstraction for requests, responses, uploaded files, cookies, sessions, ... In this example, we get a Request object from the current PHP global variables:
You can also create a Request directly -- that's interesting for unit testing:
And here is how to create and send a Response:
The Request and the Response classes have many other methods that implement the HTTP specification. ResourcesYou can run the unit tests with the following command:
|