DefaultTextRoleFactory
in package
implements
TextRoleFactory
FinalYes
Table of Contents
Interfaces
Properties
- $defaultTextRole : TextRole
- $domains : array<string|int, mixed>
- $genericTextRole : TextRole
- $textRoles : array<string|int, TextRole>
Methods
- __construct() : mixed
- getDefaultTextRole() : TextRole
- getTextRole() : TextRole
- registerTextRole() : void
- replaceTextRole() : void
- setDefaultTextRole() : void
- findTextRole() : TextRole
Properties
$defaultTextRole
private
TextRole
$defaultTextRole
$domains read-only
private
array<string|int, mixed>
$domains
= []
$genericTextRole read-only
private
TextRole
$genericTextRole
$textRoles
private
array<string|int, TextRole>
$textRoles
Methods
__construct()
public
__construct(TextRole $genericTextRole, TextRole $defaultTextRole[, iterable<string|int, TextRole> $textRoles = [] ][, array<string, array<string|int, TextRole>> $domains = [] ]) : mixed
Parameters
getDefaultTextRole()
public
getDefaultTextRole() : TextRole
Return values
TextRolegetTextRole()
public
getTextRole(string $name[, string|null $domain = null ]) : TextRole
Parameters
- $name : string
- $domain : string|null = null
Return values
TextRoleregisterTextRole()
public
registerTextRole(TextRole $textRole) : void
Parameters
- $textRole : TextRole
replaceTextRole()
public
replaceTextRole(TextRole $newTextRole) : void
Parameters
- $newTextRole : TextRole
setDefaultTextRole()
public
setDefaultTextRole(string $roleName) : void
Parameters
- $roleName : string
findTextRole()
private
findTextRole(array<string|int, TextRole> $textRoles, string $name) : TextRole
Parameters
- $textRoles : array<string|int, TextRole>
- $name : string