public static function identifier(array $match)
    {
        $name = $match[1]; // this should be the matched name.
        if($name === '*') {
            return '(?P<pathInfo>.*)';
        }
        $type = '[-_0-9a-zA-Z]';
        if (strpos($name, ':') !== false) {
            list($name, $type) = explode(':', $name, 2);
            if(isset(self::$types[$type])) {
                $type = self::$types[$type];
            }
        }
        return "(?P<{$name}>{$type}+)";
    }
public static function identifier(array $match)
    {
        $name = $match[1]; // this should be the matched name.
        if($name === '*') {
            return '(?P<pathInfo>.*)';
        }
        $type = '[-_0-9a-zA-Z]';
        if (strpos($name, ':') !== false) {
            list($name, $type) = explode(':', $name, 2);
            if(isset(self::$types[$type])) {
                $type = self::$types[$type];
            }
        }
        return "(?P<{$name}>{$type}+)";
    }
public static function identifier ( array $ match ) { $ name = $ match [ 1 ] ; // this should be the matched name. if ( $ name === '*' ) { return '(?P<pathInfo>.*)' ; } $ type = '[-_0-9a-zA-Z]' ; if ( strpos ( $ name , ':' ) !== false ) { list ( $ name , $ type ) = explode ( ':' , $ name , 2 ) ; if ( isset ( self :: $ types [ $ type ] ) ) { $ type = self :: $ types [ $ type ] ; } } return "(?P<{$name}>{$type}+)" ; }
a callback method for converting identifier in
route pattern to regex's one.

i.e. {id} -> (?P<id>[\w]}).

@param array $match
@return string
a callback method for converting identifier in route pattern to regex s one .