pock

PathMatcher
in package
implements RequestMatcherInterface

Matches a request path, treating the leading slash as optional.

Tags
category

PathMatcher

Table of Contents

Interfaces

RequestMatcherInterface
Contract for reusable request matching rules registered through PockBuilder::addMatcher().

Methods

__construct()  : mixed
PathMatcher constructor.
matches()  : bool
Return true when the request satisfies this rule.

Methods

__construct()

PathMatcher constructor.

public __construct(string $path) : mixed
Parameters
$path : string

matches()

Return true when the request satisfies this rule.

public matches(RequestInterface $request) : bool
Parameters
$request : RequestInterface
Tags
inheritDoc
Return values
bool
On this page

Search results