75 lines
2 KiB
PHP
75 lines
2 KiB
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Traits\Enums\BaseEnum;
|
|
|
|
enum SignsEnum: int
|
|
{
|
|
use BaseEnum;
|
|
|
|
case leclerc = 1;
|
|
case auchan = 2;
|
|
case carrefour = 3;
|
|
case match = 4;
|
|
case intermarche = 5;
|
|
case cora = 6;
|
|
case coccinelleexpress = 7;
|
|
case superu = 8;
|
|
case hyperu = 9;
|
|
case uexpress = 10;
|
|
case netto = 11;
|
|
|
|
private const LABELS = [
|
|
self::leclerc->name => 'Leclerc',
|
|
self::auchan->name => 'Auchan',
|
|
self::carrefour->name => 'Carrefour',
|
|
self::match->name => 'Match',
|
|
self::intermarche->name => 'Intermarché',
|
|
self::cora->name => 'Cora',
|
|
self::coccinelleexpress->name => 'Coccinelle Express',
|
|
self::superu->name => 'Super U',
|
|
self::hyperu->name => 'Hyper U',
|
|
self::uexpress->name => 'U Express',
|
|
self::netto->name => 'Netto',
|
|
];
|
|
|
|
/**
|
|
* Enum stickers associés
|
|
*
|
|
* @return array
|
|
*/
|
|
private const STICKERS = [
|
|
self::leclerc->name => 'logo-leclerc.png',
|
|
self::auchan->name => 'logo-auchan.jpg',
|
|
self::carrefour->name => 'logo-carrefour.jpg',
|
|
self::match->name => 'logo-match.png',
|
|
self::intermarche->name => 'logo-intermarche.png',
|
|
self::cora->name => 'logo-cora.png',
|
|
self::coccinelleexpress->name => 'logo-coccinelle-express.png',
|
|
self::superu->name => 'logo-super-u.jpg',
|
|
self::hyperu->name => 'logo-hyper-u.jpg',
|
|
self::uexpress->name => 'logo-u-express.jpg',
|
|
self::netto->name => 'logo-netto.png',
|
|
];
|
|
|
|
/**
|
|
* Get sticker
|
|
*
|
|
* @return string
|
|
*/
|
|
public function sticker(): string
|
|
{
|
|
return self::STICKERS[$this->name];
|
|
}
|
|
|
|
/**
|
|
* Get enum stickers
|
|
*
|
|
* @return array<string>
|
|
*/
|
|
public static function toStickers(): array
|
|
{
|
|
return self::STICKERS;
|
|
}
|
|
}
|