Skip to content

Commit

Permalink
Extend export destination interface
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Feb 8, 2022
1 parent 30f2a49 commit 8e00a54
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions lib/public/UserMigration/IExportDestination.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,22 @@ interface IExportDestination {
*
* @param string $path Full path to the file in the export archive. Parent directories will be created if needed.
* @param string $content The full content of the file.
* @return bool whether the file was successfully added.
* @return bool whether the file contents were successfully added.
*
* @since 24.0.0
*/
public function addFile(string $path, string $content): bool;
public function addFileContents(string $path, string $content): bool;

/**
* Adds a file to the export as a stream
*
* @param string $path Full path to the file in the export archive. Parent directories will be created if needed.
* @param resource $stream A stream resource to read from to get the file content.
* @return bool whether the file stream was successfully added.
*
* @since 24.0.0
*/
public function addFileAsStream(string $path, $stream): bool;

/**
* Copy a folder to the export
Expand Down

0 comments on commit 8e00a54

Please sign in to comment.