mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-12 21:43:48 +08:00
d1f69feb4a
Some checks failed
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
analyse-php / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
23 lines
548 B
PHP
23 lines
548 B
PHP
<?php
|
|
|
|
namespace Tests\Exports;
|
|
|
|
class ZipResultData
|
|
{
|
|
public function __construct(
|
|
public string $zipPath,
|
|
public string $extractedDirPath,
|
|
public array $data,
|
|
) {
|
|
}
|
|
|
|
/**
|
|
* Build a path to a location the extracted content, using the given relative $path.
|
|
*/
|
|
public function extractPath(string $path): string
|
|
{
|
|
$relPath = implode(DIRECTORY_SEPARATOR, explode('/', $path));
|
|
return $this->extractedDirPath . DIRECTORY_SEPARATOR . ltrim($relPath, DIRECTORY_SEPARATOR);
|
|
}
|
|
}
|