|
Revision 6648, 1.7 kB
(checked in by fabien, 5 years ago)
|
fixed call to undefined method sfResponse::sendHttpHeaders (closes #2412)
|
- 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 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 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 |
|
|---|
| 33 |
$filterChain->execute(); |
|---|
| 34 |
|
|---|
| 35 |
if (sfConfig::get('sf_logging_enabled')) |
|---|
| 36 |
{ |
|---|
| 37 |
$this->getContext()->getLogger()->info('{sfFilter} render to client'); |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 |
$response = $this->getContext()->getResponse(); |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
if (method_exists($response, 'sendHttpHeaders')) |
|---|
| 45 |
{ |
|---|
| 46 |
$response->sendHttpHeaders(); |
|---|
| 47 |
} |
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
$response->sendContent(); |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) |
|---|
| 54 |
{ |
|---|
| 55 |
$logger = $this->getContext()->getLogger(); |
|---|
| 56 |
foreach (sfTimerManager::getTimers() as $name => $timer) |
|---|
| 57 |
{ |
|---|
| 58 |
$logger->info(sprintf('{sfTimerManager} %s %.2f ms (%d)', $name, $timer->getElapsedTime() * 1000, $timer->getCalls())); |
|---|
| 59 |
} |
|---|
| 60 |
} |
|---|
| 61 |
} |
|---|
| 62 |
} |
|---|
| 63 |
|
|---|