%PDF- %PDF-
Direktori : /var/www/projetos/admin.iigd.com.br/vendor/nikic/fast-route/src/DataGenerator/ |
Current File : /var/www/projetos/admin.iigd.com.br/vendor/nikic/fast-route/src/DataGenerator/CharCountBased.php |
<?php namespace FastRoute\DataGenerator; class CharCountBased extends RegexBasedAbstract { protected function getApproxChunkSize() { return 30; } protected function processChunk($regexToRoutesMap) { $routeMap = []; $regexes = []; $suffixLen = 0; $suffix = ''; $count = count($regexToRoutesMap); foreach ($regexToRoutesMap as $regex => $route) { $suffixLen++; $suffix .= "\t"; $regexes[] = '(?:' . $regex . '/(\t{' . $suffixLen . '})\t{' . ($count - $suffixLen) . '})'; $routeMap[$suffix] = [$route->handler, $route->variables]; } $regex = '~^(?|' . implode('|', $regexes) . ')$~'; return ['regex' => $regex, 'suffix' => '/' . $suffix, 'routeMap' => $routeMap]; } }