interface PathMatcherInterface (View source)

Provides an interface for URL path matchers.

Methods

bool
matchPath(string $path, string $patterns)

Checks if a path matches any pattern in a set of patterns.

bool
isFrontPage()

Checks if the current page is the front page.

Details

bool matchPath(string $path, string $patterns)

Checks if a path matches any pattern in a set of patterns.

Parameters

string $path

The path to match.

string $patterns

A set of patterns separated by a newline.

Return Value

bool

TRUE if the path matches a pattern, FALSE otherwise.

bool isFrontPage()

Checks if the current page is the front page.

Return Value

bool

TRUE if the current page is the front page.