mirror of
https://github.com/MarijnDoeve/TijdVoorDeTest.git
synced 2026-03-06 04:44:19 +01:00
26 lines
613 B
PHP
26 lines
613 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tvdt\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController as AbstractBaseController;
|
|
use Tvdt\Enum\FlashType;
|
|
|
|
abstract class AbstractController extends AbstractBaseController
|
|
{
|
|
protected const string SEASON_CODE_REGEX = '[A-Za-z\d]{5}';
|
|
|
|
protected const string CANDIDATE_HASH_REGEX = '[\w\-=]+';
|
|
|
|
#[\Override]
|
|
protected function addFlash(FlashType|string $type, mixed $message): void
|
|
{
|
|
if ($type instanceof FlashType) {
|
|
$type = $type->value;
|
|
}
|
|
|
|
parent::addFlash($type, $message);
|
|
}
|
|
}
|