Pagekit\Finder\Event\FileAccessEvent::toRegex PHP Метод

toRegex() защищенный Метод

PCRE patterns are left unchanged. Default conversion: 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' Use only / as directory separator (on Windows also).
protected toRegex ( string $str ) : string
$str string Pattern: regexp or dirname.
Результат string regexp corresponding to a given string or regexp
    protected function toRegex($str)
    {
        return $this->isRegex($str) ? $str : '~' . preg_quote($str, '~') . '~';
    }