[ Index ] |
|
Code source de Symfony 1.0.0 |
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: sfRenderingFilter.class.php 3244 2007-01-12 14:46:11Z fabien $ 19 */ 20 class sfRenderingFilter extends sfFilter 21 { 22 /** 23 * Executes this filter. 24 * 25 * @param sfFilterChain 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 if (sfConfig::get('sf_logging_enabled')) 36 { 37 $this->getContext()->getLogger()->info('{sfFilter} render to client'); 38 } 39 40 // get response object 41 $response = $this->getContext()->getResponse(); 42 43 // send headers 44 $response->sendHttpHeaders(); 45 46 // send content 47 $response->sendContent(); 48 49 // log timers information 50 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) 51 { 52 $logger = $this->getContext()->getLogger(); 53 foreach (sfTimerManager::getTimers() as $name => $timer) 54 { 55 $logger->info(sprintf('{sfTimerManager} %s %.2f ms (%d)', $name, $timer->getElapsedTime() * 1000, $timer->getCalls())); 56 } 57 } 58 } 59 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |