EmojiResolver
Table of Contents
Constants
-
EMOJI_PLACEHOLDER_REGEX
: mixed = '/\{\{emoji:([a-z0-9_]+)\}\}/i'
Properties
-
$default
: self|null
-
$emojiMap
: array<string|int, mixed>
-
$gchatToNormalized
: array<string|int, mixed>
-
$githubToNormalized
: array<string|int, mixed>
-
$slackToNormalized
: array<string|int, mixed>
Methods
-
__construct()
: mixed
-
convertPlaceholders()
: string
-
default()
: self
-
extend()
: void
-
fromGChat()
: string
-
fromGithub()
: string
-
fromSlack()
: string
-
fromTeams()
: string
-
matches()
: bool
-
toDiscord()
: string
-
toGChat()
: string
-
toGithub()
: string
-
toSlack()
: string
-
buildReverseMaps()
: void
-
resolveGithubFormat()
: string|null
EMOJI_PLACEHOLDER_REGEX
private
mixed
EMOJI_PLACEHOLDER_REGEX
= '/\{\{emoji:([a-z0-9_]+)\}\}/i'
$default
private
static self|null
$default
= null
$emojiMap
private
array<string|int, mixed>
$emojiMap
$gchatToNormalized
private
array<string|int, mixed>
$gchatToNormalized
= []
$githubToNormalized
private
array<string|int, mixed>
$githubToNormalized
= []
$slackToNormalized
private
array<string|int, mixed>
$slackToNormalized
= []
__construct()
public
__construct([array<string|int, mixed>|null $customMap = null ][, string|null $jsonPath = null ]) : mixed
Parameters
-
$customMap
: array<string|int, mixed>|null
= null
-
-
$jsonPath
: string|null
= null
-
convertPlaceholders()
public
static convertPlaceholders(string $text, string $platform[, self|null $resolver = null ]) : string
Parameters
-
$text
: string
-
-
$platform
: string
-
-
$resolver
: self|null
= null
-
default()
public
static default() : self
extend()
public
extend(array<string|int, mixed> $customMap) : void
Parameters
-
$customMap
: array<string|int, mixed>
-
fromGChat()
public
fromGChat(string $emoji) : string
Parameters
-
$emoji
: string
-
fromGithub()
public
fromGithub(string $githubEmoji) : string
Parameters
-
$githubEmoji
: string
-
fromSlack()
public
fromSlack(string $slackEmoji) : string
Parameters
-
$slackEmoji
: string
-
fromTeams()
public
fromTeams(string $teamsReaction) : string
Parameters
-
$teamsReaction
: string
-
matches()
public
matches(string $rawEmoji, string $normalized) : bool
Parameters
-
$rawEmoji
: string
-
-
$normalized
: string
-
toDiscord()
public
toDiscord(string $emoji) : string
Parameters
-
$emoji
: string
-
toGChat()
public
toGChat(string $emoji) : string
Parameters
-
$emoji
: string
-
toGithub()
public
toGithub(string $emoji) : string
Parameters
-
$emoji
: string
-
toSlack()
public
toSlack(string $emoji) : string
Parameters
-
$emoji
: string
-
buildReverseMaps()
private
buildReverseMaps() : void
private
resolveGithubFormat(string $emoji) : string|null
Parameters
-
$emoji
: string
-
Return values
string|null