RulesetInflector
in package
implements
WordInflector
Inflects based on multiple rulesets.
Rules:
- If the word matches any uninflected word pattern, it is not inflected
- The first ruleset that returns a different value for an irregular word wins
- The first ruleset that returns a different value for a regular word wins
- If none of the above match, the word is left as-is
Table of Contents
Interfaces
Properties
Methods
- __construct() : mixed
- inflect() : string
Properties
$rulesets
private
array<string|int, Ruleset>
$rulesets
Methods
__construct()
public
__construct(Ruleset $ruleset, Ruleset ...$rulesets) : mixed
Parameters
inflect()
public
inflect(string $word) : string
Parameters
- $word : string