public static function match($path, $glob, $flags = 0)
    {
        if (!self::isDynamic($glob)) {
            return $glob === $path;
        }

        if (0 !== strpos($path, self::getStaticPrefix($glob, $flags))) {
            return false;
        }

        if (!preg_match(self::toRegEx($glob, $flags), $path)) {
            return false;
        }

        return true;
    }
public static function match($path, $glob, $flags = 0)
    {
        if (!self::isDynamic($glob)) {
            return $glob === $path;
        }

        if (0 !== strpos($path, self::getStaticPrefix($glob, $flags))) {
            return false;
        }

        if (!preg_match(self::toRegEx($glob, $flags), $path)) {
            return false;
        }

        return true;
    }
public static function match ( $ path , $ glob , $ flags = 0 ) { if ( ! self :: isDynamic ( $ glob ) ) { return $ glob === $ path ; } if ( 0 !== strpos ( $ path , self :: getStaticPrefix ( $ glob , $ flags ) ) ) { return false ; } if ( ! preg_match ( self :: toRegEx ( $ glob , $ flags ) , $ path ) ) { return false ; } return true ; }
Matches a path against a glob.

```php
if (Glob::match('/project/views/index.html.twig', '/project/**.twig')) {
// path matches
}
```

@param string $path  The path to match.
@param string $glob  The canonical glob. The glob should contain forward
slashes as directory separators only. It must not
contain any "." or ".." segments. Use the
"webmozart/path-util" utility to canonicalize globs
prior to calling this method.
@param int    $flags A bitwise combination of the flag constants in
this class.

@return bool Returns `true` if the path is matched by the glob.
Matches a path against a glob .