That allows projects that only use HttpFoundation and not HttpKernel to be able to enforce the HTTP specification "rules". $request = Request::createFromGlobals(); $response = new Response(); // do whatever you want with the Respons // enforce HTTP spec $response->prepare($request); $response->send(); Within Symfony2, the prepare method is automatically called by the ResponseListener. |
||
---|---|---|
.. | ||
Symfony/Tests | ||
bootstrap.php |