Gère davantage de cas dans le routeur

This commit is contained in:
clement committed 2022-11-22 08:40:05 +01:00
1 parent 9bc53b958f
commit 86827d1983
2 files changed
+29 -7

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
<?php
declare(strict_types=1);
namespace Silex\Router;
final class PathHelper
{
public static function removeEverythingAfter(string $str, string $char): string
{
$pos = strpos($str, $char);
if ($pos !== false) {
return substr($str, 0, $pos);
}
return $str;
}
}