mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-03 14:55:39 +08:00
Merge pull request #835 from crazywhalecc/chore/test-and-validate
Chore: PHPUnit test & docs & PHPDoc for vendor mode
This commit is contained in:
@@ -4,9 +4,25 @@ declare(strict_types=1);
|
||||
|
||||
namespace SPC\store\source;
|
||||
|
||||
/**
|
||||
* Abstract base class for custom source implementations
|
||||
*
|
||||
* This class provides a framework for implementing custom source download
|
||||
* logic. Extend this class to create custom source handlers.
|
||||
*/
|
||||
abstract class CustomSourceBase
|
||||
{
|
||||
/**
|
||||
* The name of this source implementation
|
||||
*/
|
||||
public const NAME = 'unknown';
|
||||
|
||||
/**
|
||||
* Fetch the source from its repository
|
||||
*
|
||||
* @param bool $force Force download even if already exists
|
||||
* @param null|array $config Optional configuration array
|
||||
* @param int $lock_as Lock type constant
|
||||
*/
|
||||
abstract public function fetch(bool $force = false, ?array $config = null, int $lock_as = SPC_DOWNLOAD_SOURCE): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user