1. sfRenderingFilter.class.php
  2. /** * sfRenderingFilter is the last filter registered for each filter chain. This * filter does the rendering. * * @package symfony * @subpackage filter * @author Fabien Potencier * @version SVN: $Id: sfRenderingFilter.class.php 11286 2008-09-02 10:27:36Z fabien $ */
  3. class sfRenderingFilter extends sfFilter
  4. {
  5. /**
  6. * Executes this filter.
  7. *
  8. * @param sfFilterChain $filterChain The filter chain.
  9. *
  10. * @throws <b>sfInitializeException</b> If an error occurs during view initialization
  11. * @throws <b>sfViewException</b> If an error occurs while executing the view
  12. */
  13. public function execute($filterChain)
  14. {
  15. // execute next filter
  16. $filterChain->execute();
  17. // get response object
  18. $response = $this->context->getResponse();
  19. // hack to rethrow sfForm and|or sfFormField __toString() exceptions (see sfForm and sfFormField)
  20. if (sfForm::hasToStringException())
  21. {
  22. throw sfForm::getToStringException();
  23. }
  24. else if (sfFormField::hasToStringException())
  25. {
  26. throw sfFormField::getToStringException();
  27. }
  28. // send headers + content
  29. $response->send();
  30. }
  31. }

Debug toolbar