• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/application.php
  • Класс: BitrixMainApplication
  • Вызов: Application::end
public function end($status = 0, Response $response = null)
{
	if($response === null)
	{
		//use default response
		$response = $this->context->getResponse();

		//it's possible to have open buffers
		$content = '';
		$n = ob_get_level();
		while(($c = ob_get_clean()) !== false && $n > 0)
		{
			$content .= $c;
			$n--;
		}

		if($content <> '')
		{
			$response->appendContent($content);
		}
	}

	$this->handleResponseBeforeSend($response);
	//this is the last point of output - all output below will be ignored
	$response->send();

	$this->terminate($status);
}