class ComponentPageUrlMatcher implements IPageUrlMatcher (View source)

Checks, that page is opened by comparing individual url components.

Methods

float
getPriority()

Returns matcher priority.

string
getAnnotationName()

Returns the name of the annotation.

string
getAnnotationClass()

Returns the FQCN of the annotation.

boolean
matches(string $url, array $annotations)

Matches the given url against the given annotations.

boolean
matchComponent(MatchUrlComponentAnnotation $annotation, string $url)

Matches components to url.

boolean
matchParams(MatchUrlComponentAnnotation $annotation, Parser $parser)

Matches query params.

boolean
matchSecure(MatchUrlComponentAnnotation $annotation, Parser $parser)

Matches secure option.

boolean
matchByProperty(MatchUrlComponentAnnotation $annotation, Parser $parser, string $property, string|null $component = null)

Matches property.

Expectation
shouldReceive(string $name)

No description

Details

float getPriority()

Returns matcher priority.

Return Value

float

string getAnnotationName()

Returns the name of the annotation.

Return Value

string

string getAnnotationClass()

Returns the FQCN of the annotation.

Return Value

string

boolean matches(string $url, array $annotations)

Matches the given url against the given annotations.

Parameters

string $url The URL.
array $annotations Given annotations.

Return Value

boolean

protected boolean matchComponent(MatchUrlComponentAnnotation $annotation, string $url)

Matches components to url.

Parameters

MatchUrlComponentAnnotation $annotation The used annotation.
string $url The current url.

Return Value

boolean

protected boolean matchParams(MatchUrlComponentAnnotation $annotation, Parser $parser)

Matches query params.

Parameters

MatchUrlComponentAnnotation $annotation The annotation.
Parser $parser Parser instance to match against.

Return Value

boolean

protected boolean matchSecure(MatchUrlComponentAnnotation $annotation, Parser $parser)

Matches secure option.

Parameters

MatchUrlComponentAnnotation $annotation The annotation.
Parser $parser Parser instance to match against.

Return Value

boolean

protected boolean matchByProperty(MatchUrlComponentAnnotation $annotation, Parser $parser, string $property, string|null $component = null)

Matches property.

Parameters

MatchUrlComponentAnnotation $annotation The annotation.
Parser $parser Parser instance to match against.
string $property Property name.
string|null $component Component name.

Return Value

boolean

Expectation shouldReceive(string $name)

Parameters

string $name

Return Value

Expectation