Bitrix API

TokenProcessor

FinalYes

Table of Contents

Methods

__construct()  : mixed
getReplacement()  : string
Retrieves the replacement for a given token, generating it if it doesn't exist.
getReplacements()  : array<string, string>
Retrieves all replacements mapped to their original tokens.
hideTokens()  : string
Hides all tokens in the provided text by replacing them with their unique replacements.

Methods

getReplacement()

Retrieves the replacement for a given token, generating it if it doesn't exist.

public getReplacement(HiddenToken $token) : string
Parameters
$token : HiddenToken
Tags
throws
Exception

If unable to generate a unique replacement after multiple attempts.

Return values
string

getReplacements()

Retrieves all replacements mapped to their original tokens.

public getReplacements() : array<string, string>
Return values
array<string, string>

Associative array of original token values to replacements.

hideTokens()

Hides all tokens in the provided text by replacing them with their unique replacements.

public hideTokens(string $text) : string
Parameters
$text : string
Return values
string

        
On this page

Search results