%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/projetos/admin.iigd.com.br/vendor/nikic/fast-route/src/DataGenerator/
Upload File :
Create Path :
Current File : /var/www/projetos/admin.iigd.com.br/vendor/nikic/fast-route/src/DataGenerator/GroupCountBased.php

<?php

namespace FastRoute\DataGenerator;

class GroupCountBased extends RegexBasedAbstract
{
    protected function getApproxChunkSize()
    {
        return 10;
    }

    protected function processChunk($regexToRoutesMap)
    {
        $routeMap = [];
        $regexes = [];
        $numGroups = 0;
        foreach ($regexToRoutesMap as $regex => $route) {
            $numVariables = count($route->variables);
            $numGroups = max($numGroups, $numVariables);

            $regexes[] = $regex . str_repeat('()', $numGroups - $numVariables);
            $routeMap[$numGroups + 1] = [$route->handler, $route->variables];

            ++$numGroups;
        }

        $regex = '~^(?|' . implode('|', $regexes) . ')$~';
        return ['regex' => $regex, 'routeMap' => $routeMap];
    }
}

Zerion Mini Shell 1.0