Files
Mangarr/src/Domain/Setting/Infrastructure/ApiPlatform/Resource/GetContentSourceResource.php
ext.jeremy.guillot@maxicoffee.domains 7506a7a3c1 style: apply php-cs-fixer formatting (PSR-12)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 20:46:59 +01:00

36 lines
1.1 KiB
PHP

<?php
namespace App\Domain\Setting\Infrastructure\ApiPlatform\Resource;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Domain\Setting\Infrastructure\ApiPlatform\State\Provider\GetContentSourceStateProvider;
use Symfony\Component\Validator\Constraints as Assert;
#[ApiResource(
shortName: 'ContentSource',
operations: [
new Get(
uriTemplate: '/content-sources/{id}',
provider: GetContentSourceStateProvider::class,
description: 'Récupère une source de contenu par son identifiant'
)
]
)]
class GetContentSourceResource
{
public function __construct(
#[Assert\NotBlank]
#[Assert\Type('integer')]
public readonly int $id,
public readonly string $baseUrl,
public readonly string $chapterUrlFormat,
public readonly string $scrapingType,
public readonly ?string $imageSelector,
public readonly ?string $nextPageSelector,
public readonly ?string $chapterSelector,
public readonly string $cleanBaseUrl,
) {
}
}