mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 16:25:39 +08:00
Add custom package downloader and extractor
This commit is contained in:
17
src/SPC/store/pkg/CustomPackage.php
Normal file
17
src/SPC/store/pkg/CustomPackage.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\store\pkg;
|
||||
|
||||
abstract class CustomPackage
|
||||
{
|
||||
abstract public function getSupportName(): array;
|
||||
|
||||
abstract public function fetch(string $name, bool $force = false, ?array $config = null): void;
|
||||
|
||||
public function extract(string $name): void
|
||||
{
|
||||
throw new \RuntimeException("Extract method not implemented for package: {$name}");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user