protected function buildRequirements(array $matches)
    {
        $result = [];
        foreach ($matches as $match) {
            list($key, $regexp) = $this->splitSegment($match[3]);
            $result[$key] = $regexp . ($match[1] == '(' ? '*' : '+');
        }

        return $result;
    }
protected function buildRequirements(array $matches)
    {
        $result = [];
        foreach ($matches as $match) {
            list($key, $regexp) = $this->splitSegment($match[3]);
            $result[$key] = $regexp . ($match[1] == '(' ? '*' : '+');
        }

        return $result;
    }
protected function buildRequirements ( array $ matches ) { $ result = [ ] ; foreach ( $ matches as $ match ) { list ( $ key , $ regexp ) = $ this -> splitSegment ( $ match [ 3 ] ) ; $ result [ $ key ] = $ regexp . ( $ match [ 1 ] == '(' ? '*' : '+' ) ; } return $ result ; }
Builds array of regular expression for route arguments

@param array $matches

@return array
Builds array of regular expression for route arguments