php
if (Glob::match('/project/views/index.html.twig', '/project/**.twig')) {
path matches
}
public static match ( string $path, string $glob, integer $flags ) : boolean | ||
$path | string | The path to match. |
$glob | string | 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. |
$flags | integer | A bitwise combination of the flag constants in this class. |
return | boolean | Returns `true` if the path is matched by the glob. |