DirectHelpManualSectionFinderService
in package
Class representing the online manual section finder service
Table of Contents
- $mapping : array<string|int, mixed>
- Online manual page links mapping
- $matches : array<string|int, mixed>
- Sections found
- __construct() : mixed
- Create instance
- sectionByOrigin() : string
- Return the appropriate section by the location provided
- result() : string|null
- Return the nearest section match.
Properties
$mapping
Online manual page links mapping
protected
array<string|int, mixed>
$mapping
$matches
Sections found
protected
array<string|int, mixed>
$matches
= []
Methods
__construct()
Create instance
public
__construct(array<string|int, mixed> $mapping) : mixed
Parameters
- $mapping : array<string|int, mixed>
-
Online manual page link mapping
Return values
mixed —sectionByOrigin()
Return the appropriate section by the location provided
public
sectionByOrigin(NonEmptyStringType $origin) : string
Parameters
- $origin : NonEmptyStringType
-
Origin URL
Return values
string —result()
Return the nearest section match.
protected
result() : string|null
It is done by sorting the match array by the keys, that represent the intersection count and then return the last element.