This repository has been archived on 2023-10-21. You can view files and clone it, but cannot push or open issues or pull requests.
patchouli/src/Dummy/DummyPackageTarget.php
2020-12-29 02:40:16 +00:00

33 lines
749 B
PHP

<?php
namespace Patchouli\Dummy;
use Patchouli\Platform;
use Patchouli\IPackageTarget;
class DummyPackageTarget implements IPackageTarget {
function getPlatform(): Platform {
return Platform::get(Platform::WIN_IA32);
}
public function getFiles(): array {
return [
new DummyPackageFile('poop.exe'),
];
}
public function getDependencies(): array {
return [];
}
public function fwifSerialize(): array {
$data = [
'plat' => $this->getPlatform(),
'files' => $this->getFiles(),
'deps' => [],
];
foreach($this->getDependencies() as $pack)
$data['deps'][] = $pack->getName();
return $data;
}
}