source/Provider/SegmentProvider.php
protected function matchRequest(Request $request, array $parameters = [])
    {
        if (!isset($parameters['_modular_path'])) {
            throw new \InvalidArgumentException('The routing provider expected parameter "_modular_path" but could not find it.');
        }

        // Grab the first segment from the remaining path
        $path = $parameters['_modular_path'];
        $position = strpos($path, '/');

        return $position ? substr($path, 0, $position) : $path;
    }
protected function matchRequest(Request $request, array $parameters = [])
    {
        if (!isset($parameters['_modular_path'])) {
            throw new \InvalidArgumentException('The routing provider expected parameter "_modular_path" but could not find it.');
        }

        // Grab the first segment from the remaining path
        $path = $parameters['_modular_path'];
        $position = strpos($path, '/');

        return $position ? substr($path, 0, $position) : $path;
    }
protected function matchRequest ( Request $ request , array $ parameters = [ ] ) { if ( ! isset ( $ parameters [ '_modular_path' ] ) ) { throw new \ InvalidArgumentException ( 'The routing provider expected parameter "_modular_path" but could not find it.' ) ; } // Grab the first segment from the remaining path $ path = $ parameters [ '_modular_path' ] ; $ position = strpos ( $ path , '/' ) ; return $ position ? substr ( $ path , 0 , $ position ) : $ path ; }
Filters the module identity from the request path.

@param Request $request    The request to match
@param array   $parameters Parameters returned by an UrlMatcher

@return string
@throws \InvalidArgumentException If the "_modular_path" parameter is not set
Filters the module identity from the request path .