Removed Response::removeOutput, moved recursive buffer cleanup into Response::cleanOutput

This commit is contained in:
Alexander Makarov
2013-04-16 01:01:23 +04:00
parent 9f2b44fc21
commit 1e21bae999

View File

@ -40,19 +40,11 @@ class Response extends Component
return ob_get_contents(); return ob_get_contents();
} }
/**
* Discards the output buffer
*/
public function cleanOutput()
{
ob_clean();
}
/** /**
* Discards the output buffer * Discards the output buffer
* @param boolean $all if true recursively discards all output buffers used * @param boolean $all if true recursively discards all output buffers used
*/ */
public function removeOutput($all = true) public function cleanOutput($all = true)
{ {
if ($all) { if ($all) {
for ($level = ob_get_level(); $level > 0; --$level) { for ($level = ob_get_level(); $level > 0; --$level) {