2024-05-09 17:55:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Modules\Plugins\Manifest;
|
|
|
|
|
|
|
|
use CodeIgniter\HTTP\URI;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @property string $type
|
2024-07-04 13:32:44 +00:00
|
|
|
* @property URI $url
|
2024-05-09 17:55:41 +00:00
|
|
|
* @property ?string $directory
|
|
|
|
*/
|
|
|
|
class Repository extends ManifestObject
|
|
|
|
{
|
2024-12-23 15:35:47 +00:00
|
|
|
public static array $validation_rules = [
|
2024-12-15 17:34:36 +00:00
|
|
|
'type' => 'permit_empty|in_list[git]',
|
2024-05-09 17:55:41 +00:00
|
|
|
'url' => 'required|valid_url_strict',
|
|
|
|
'directory' => 'permit_empty',
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<string,array{string}|string>
|
|
|
|
*/
|
2024-12-23 15:35:47 +00:00
|
|
|
protected array $casts = [
|
2024-05-09 17:55:41 +00:00
|
|
|
'url' => URI::class,
|
|
|
|
];
|
|
|
|
|
2024-12-15 17:34:36 +00:00
|
|
|
protected string $type = 'git';
|
2024-05-09 17:55:41 +00:00
|
|
|
|
|
|
|
protected URI $url;
|
|
|
|
|
|
|
|
protected ?string $directory = null;
|
|
|
|
}
|