getNumParts example

// The fit value is a binary number which has 1 at every fixed path           // position and 0 where there is a wildcard. We keep track of all such           // patterns that exist so that we can minimize the number of path           // patterns we need to check in the RouteProvider.           $masks[$compiled->getFit()] = 1;
          $names[] = $name;
          $values = [
            'name' => $name,
            'fit' => $compiled->getFit(),
            'path' => $route->getPath(),
            'pattern_outline' => $compiled->getPatternOutline(),
            'number_parts' => $compiled->getNumParts(),
            'route' => serialize($route),
          ];
          $insert->values($values);
        }

        // Insert all new routes.         $insert->execute();
      }

    }
    catch (\Exception $e) {
      
Home | Imprint | This part of the site doesn't use cookies.