diff --git a/formwork/src/Utils/Str.php b/formwork/src/Utils/Str.php index 4a66f872..960dc568 100644 --- a/formwork/src/Utils/Str.php +++ b/formwork/src/Utils/Str.php @@ -15,6 +15,11 @@ class Str '\t' => '', '\r' => '', '!' => '', '"' => '', '#' => '', '$' => '', '%' => '', '\'' => '-', '(' => '', ')' => '', '*' => '', '+' => '', ',' => '', '.' => '', ':' => '', ';' => '', '<' => '', '=' => '', '>' => '', '?' => '', '@' => '', '[' => '', ']' => '', '^' => '', '`' => '', '{' => '', '|' => '', '}' => '', '¡' => '', '£' => '', '¤' => '', '¥' => '', '¦' => '', '§' => '', '«' => '', '°' => '', '»' => '', '‘' => '', '’' => '', '“' => '', '”' => '', '\n' => '-', ' ' => '-', '-' => '-', '–' => '-', '—' => '-', '/' => '-', '\\' => '-', '_' => '-', '~' => '-', 'À' => 'A', 'Á' => 'A', 'Â' => 'A', 'Ã' => 'A', 'Ä' => 'A', 'Å' => 'A', 'Æ' => 'Ae', 'Ç' => 'C', 'Ð' => 'D', 'È' => 'E', 'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Ì' => 'I', 'Í' => 'I', 'Î' => 'I', 'Ï' => 'I', 'Ñ' => 'N', 'Ò' => 'O', 'Ó' => 'O', 'Ô' => 'O', 'Õ' => 'O', 'Ö' => 'O', 'Ø' => 'O', 'Œ' => 'Oe', 'Š' => 'S', 'Þ' => 'Th', 'Ù' => 'U', 'Ú' => 'U', 'Û' => 'U', 'Ü' => 'U', 'Ý' => 'Y', 'à' => 'a', 'á' => 'a', 'â' => 'a', 'ã' => 'a', 'ä' => 'ae', 'å' => 'a', 'æ' => 'ae', '¢' => 'c', 'ç' => 'c', 'ð' => 'd', 'è' => 'e', 'é' => 'e', 'ê' => 'e', 'ë' => 'e', 'ì' => 'i', 'í' => 'i', 'î' => 'i', 'ï' => 'i', 'ñ' => 'n', 'ò' => 'o', 'ó' => 'o', 'ô' => 'o', 'õ' => 'o', 'ö' => 'oe', 'ø' => 'o', 'œ' => 'oe', 'š' => 's', 'ß' => 'ss', 'þ' => 'th', 'ù' => 'u', 'ú' => 'u', 'û' => 'u', 'ü' => 'ue', 'ý' => 'y', 'ÿ' => 'y', 'Ÿ' => 'y' ]; + /** + * Regex to match interpolated sequences in strings + */ + protected const INTERPOLATION_REGEX = '/^{{([\-._a-z]+)}}$/i'; + /** * Return whether $haystack string starts with $needle */