Development

/branches/1.3/lib/filter/sfRenderingFilter.class.php

You must first sign up to be able to contribute.

root/branches/1.3/lib/filter/sfRenderingFilter.class.php

Revision 29524, 1.5 kB (checked in by fabien, 5 years ago)

[1.3, 1.4] fixed sfWebResponse::sendHttpHeaders() call from sfController::forward() in sfController::getPresentationFor() prevents later call to sendHttpHeaders() within main controller (closes #8568)

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * sfRenderingFilter is the last filter registered for each filter chain. This
13  * filter does the rendering.
14  *
15  * @package    symfony
16  * @subpackage filter
17  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
18  * @version    SVN: $Id$
19  */
20 class sfRenderingFilter extends sfFilter
21 {
22   /**
23    * Executes this filter.
24    *
25    * @param sfFilterChain $filterChain The filter chain.
26    *
27    * @throws <b>sfInitializeException</b> If an error occurs during view initialization
28    * @throws <b>sfViewException</b>       If an error occurs while executing the view
29    */
30   public function execute($filterChain)
31   {
32     // execute next filter
33     $filterChain->execute();
34
35     // get response object
36     $response = $this->context->getResponse();
37
38     // hack to rethrow sfForm and|or sfFormField __toString() exceptions (see sfForm and sfFormField)
39     if (sfForm::hasToStringException())
40     {
41       throw sfForm::getToStringException();
42     }
43     else if (sfFormField::hasToStringException())
44     {
45       throw sfFormField::getToStringException();
46     }
47
48     // send headers + content
49     if (sfView::RENDER_VAR != $this->context->getController()->getRenderMode())
50     {
51         $response->send();
52     }
53   }
54 }
55
Note: See TracBrowser for help on using the browser.