mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00
35 lines
642 B
PHP
35 lines
642 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\Plugins\Manifest;
|
|
|
|
use CodeIgniter\HTTP\URI;
|
|
|
|
/**
|
|
* @property string $type
|
|
* @property URI $url
|
|
* @property ?string $directory
|
|
*/
|
|
class Repository extends ManifestObject
|
|
{
|
|
protected const VALIDATION_RULES = [
|
|
'type' => 'required|in_list[git]',
|
|
'url' => 'required|valid_url_strict',
|
|
'directory' => 'permit_empty',
|
|
];
|
|
|
|
/**
|
|
* @var array<string,array{string}|string>
|
|
*/
|
|
protected const CASTS = [
|
|
'url' => URI::class,
|
|
];
|
|
|
|
protected string $type;
|
|
|
|
protected URI $url;
|
|
|
|
protected ?string $directory = null;
|
|
}
|