42 lines
972 B
PHP
42 lines
972 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @package MokoJoomBackup
|
||
|
|
* @subpackage com_mokobackup
|
||
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
||
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
||
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
||
|
|
*/
|
||
|
|
|
||
|
|
namespace Joomla\Component\MokoBackup\Administrator\Engine;
|
||
|
|
|
||
|
|
defined('_JEXEC') or die;
|
||
|
|
|
||
|
|
interface ArchiverInterface
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Open or create the archive at the given path.
|
||
|
|
*/
|
||
|
|
public function open(string $path): void;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Add a string as a file inside the archive.
|
||
|
|
*/
|
||
|
|
public function addFromString(string $localName, string $contents): void;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Add a file from disk into the archive.
|
||
|
|
*/
|
||
|
|
public function addFile(string $filePath, string $localName): void;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Finalize and close the archive.
|
||
|
|
*/
|
||
|
|
public function close(): void;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Return the file extension for this archive type (e.g. 'zip', 'tar.gz').
|
||
|
|
*/
|
||
|
|
public function getExtension(): string;
|
||
|
|
}
|