403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/web/webpacker/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/web/webpacker/filecontroller.php
<?php

namespace Bitrix\Main\Web\WebPacker;

use Bitrix\Main\ArgumentException;

/**
 * Class FileController
 *
 * @package Bitrix\Main\Web\WebPacker
 */
class FileController extends Builder
{
	/** @var Output\File $file File. */
	private $file;

	/** @var Loader $loader Loader. */
	private $loader;

	/**
	 * Delete.
	 *
	 * @return void
	 */
	public function delete()
	{
		$this->getOutputFile()->remove();
	}

	/**
	 * Configure file.
	 *
	 * @param int|null $id File ID.
	 * @param string $moduleId Bitrix module ID.
	 * @param string $dir File directory.
	 * @param string $name Filename.
	 * @return $this
	 */
	public function configureFile(?int $id, string $moduleId, string $dir, string $name): static
	{
		$this->getOutputFile()->setId($id)->setModuleId($moduleId)->setDir($dir)->setName($name);

		return $this;
	}

	/**
	 * @return Loader
	 */
	public function getLoader()
	{
		if (!$this->loader)
		{
			$this->loader = new Loader($this->getOutputFile());
		}

		return $this->loader;
	}

	/**
	 * Get output file.
	 *
	 * @return Output\File
	 */
	protected function getOutputFile()
	{
		if (!$this->file)
		{
			$this->file = new Output\File();
		}

		$this->setOutput($this->file);

		return $this->file;
	}

	/**
	 * Set output.
	 *
	 * @param Output\Base $output Output.
	 * @return $this
	 */
	public function setOutput(Output\Base $output)
	{
		if (! $output instanceof Output\File)
		{
			throw new ArgumentException('Output File expected.');
		}

		parent::setOutput($output);
		return $this;
	}

	/**
	 * Get output.
	 *
	 * @return Output\Base
	 */
	public function getOutput()
	{
		if (!$this->output)
		{
			$this->output = new Output\File();
		}

		return $this->output;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit