aspirecloud/app/Values/WpOrg/Export/ExportRequest.php
Cristi Rusu 52e6b9b5df refactor: Pass ExportRequest instead of arrays as args in ExportService methods
Move the ExportRequest class in the `App\Http\Controllers\API\WpOrg\` namespace.
2025-07-18 17:36:19 +03:00

23 lines
560 B
PHP

<?php
declare(strict_types=1);
namespace App\Values\WpOrg\Export;
use App\Values\DTO;
use Bag\Attributes\Validation\In;
use Bag\Attributes\Validation\Regex;
use Bag\Attributes\StripExtraParameters;
use Bag\Attributes\Laravel\FromRouteParameter;
#[StripExtraParameters]
readonly class ExportRequest extends DTO
{
public function __construct(
#[FromRouteParameter('type')]
#[In('plugins', 'themes', 'closed_plugins')]
public string $type,
#[Regex('/^\d{4}-\d{2}-\d{2}$/')]
public ?string $after = null,
) {}
}