\AddTextdomain

Summary

Methods
Properties
Constants
AddTextdomain()
usage()
process_file()
process_string()
process_tokens()
$modified_contents
$funcs
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$modified_contents

$modified_contents

$funcs

$funcs

Methods

AddTextdomain()

AddTextdomain()

usage()

usage()

process_file()

process_file(string $domain, string $source_filename, bool $inplace)

Add textdomain to a single file.

Parameters

string $domain

Text domain.

string $source_filename

Filename with optional path.

bool $inplace

True to modifies the PHP file in place. False to print to standard output.

process_string()

process_string(string $domain, string $string) : string

Add textdomain to a string of PHP.

Functions calls should be wrapped in opening and closing PHP delimiters as usual.

Parameters

string $domain

Text domain.

string $string

PHP code to parse.

Returns

string —

Modified source.

process_tokens()

process_tokens(string $domain, array $tokens) : string

Add textdomain to a set of PHP tokens.

Parameters

string $domain

Text domain.

array $tokens

PHP tokens. An array of token identifiers. Each individual token identifier is either a

                  single character (i.e.: ;, ., >, !, etc.), or a three element array containing the token
                  index in element 0, the string content of the original token in element 1 and the line
                  number in element 2.

Returns

string —

Modified source.