Documentation

InflectorFactory extends GenericLanguageInflectorFactory
in package

FinalYes

Table of Contents

Properties

$pluralRulesets  : array<string|int, Ruleset>
$singularRulesets  : array<string|int, Ruleset>

Methods

__construct()  : mixed
build()  : Inflector
Builds the inflector instance with all applicable rules
withPluralRules()  : $this
Applies custom rules for pluralisation
withSingularRules()  : $this
Applies custom rules for singularisation
getPluralRuleset()  : Ruleset
getSingularRuleset()  : Ruleset

Properties

Methods

withPluralRules()

Applies custom rules for pluralisation

public final withPluralRules(Ruleset|null $pluralRules[, bool $reset = false ]) : $this
Parameters
$pluralRules : Ruleset|null
$reset : bool = false

If true, will unset default inflections for all new rules

Return values
$this

withSingularRules()

Applies custom rules for singularisation

public final withSingularRules(Ruleset|null $singularRules[, bool $reset = false ]) : $this
Parameters
$singularRules : Ruleset|null
$reset : bool = false

If true, will unset default inflections for all new rules

Return values
$this

        
On this page

Search results