<?php
/**
 * Base class for a simple file representation.
 *
 * @package Ealab\Deployer
 */

namespace Ealab\Deployer\File;

use Ealab\Deployer\Exception\WpDeployException;

/**
 * Base class for a simple file representation.
 */
abstract class FileBase {
	/**
	 * The raw file content.
	 *
	 * @var string
	 */
	protected string $raw_file_content = '';

	/**
	 * Gets the raw file content.
	 *
	 * @return string The raw file content.
	 */
	public function getRawFileContent(): string {
		return $this->raw_file_content;
	}

	/**
	 * Sets the raw file content.
	 *
	 * @param string $raw_file_content The raw file content.
	 *
	 * @throws WpDeployException Could not set raw file content.
	 */
	public function setRawFileContent( string $raw_file_content ): void {
		$this->raw_file_content = $raw_file_content;
	}
}
