Files
static-php-cli/src/SPC/store/source/CustomSourceBase.php

29 lines
778 B
PHP
Raw Normal View History

2023-04-09 12:11:14 +08:00
<?php
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.
*/
2023-04-09 12:11:14 +08:00
abstract class CustomSourceBase
{
/**
* The name of this source implementation
*/
2023-04-09 12:11:14 +08:00
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
*/
2025-03-30 23:27:43 +08:00
abstract public function fetch(bool $force = false, ?array $config = null, int $lock_as = SPC_DOWNLOAD_SOURCE): void;
2023-04-09 12:11:14 +08:00
}