ogcore/src/Model/ImageStatus.php

35 lines
835 B
PHP

<?php
namespace App\Model;
final class ImageStatus
{
public const string PENDING = 'pending';
public const string IN_PROGRESS = 'in-progress';
public const string SUCCESS = 'success';
public const string TRASH = 'trash';
public const string FAILED = 'failed';
private const array STATUS = [
self::PENDING => 'Pendiente',
self::IN_PROGRESS => 'En progreso',
self::TRASH => 'Papelera',
self::SUCCESS => 'Completado',
self::FAILED => 'Fallido',
];
public static function getStatus(): array
{
return self::STATUS;
}
public static function getImageStatus(string $status): ?string
{
return self::STATUS[$status] ?? null;
}
public static function getStatusKeys(): array
{
return array_keys(self::STATUS);
}
}