- Fix: Notifiable-Trait zum User-Model hinzugefuegt (behebt notify()-500er) - Installer: SMTP-Verbindungstest mit EsmtpTransport + Ueberspringen-Link - Admin: Neuer E-Mail-Tab mit SMTP-Konfiguration + Verbindungstest - Admin: Lazy Quill-Initialisierung (nur sichtbare Locale wird geladen) - Uebersetzungen: 17 neue Mail-Keys in allen 6 Sprachen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
602 B
PHP
Executable File
30 lines
602 B
PHP
Executable File
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Doctrine\Inflector\Rules;
|
|
|
|
use function array_map;
|
|
use function implode;
|
|
use function preg_match;
|
|
|
|
class Patterns
|
|
{
|
|
/** @var string */
|
|
private $regex;
|
|
|
|
public function __construct(Pattern ...$patterns)
|
|
{
|
|
$patterns = array_map(static function (Pattern $pattern): string {
|
|
return $pattern->getPattern();
|
|
}, $patterns);
|
|
|
|
$this->regex = '/^(?:' . implode('|', $patterns) . ')$/i';
|
|
}
|
|
|
|
public function matches(string $word): bool
|
|
{
|
|
return preg_match($this->regex, $word, $regs) === 1;
|
|
}
|
|
}
|