class CRM_Core_Resources_Strings

Manage translatable strings on behalf of resource files.

Methods

__construct(CRM_Utils_Cache_Interface $cache)

No description

flush()

Flush the cache of translated strings.

array
get(string $bucket, string $file, string $format)

Get the strings from a file, using a cache if available.

array
extract(string $file, string $format)

Extract a list of strings from a file.

Details

at line 46
__construct(CRM_Utils_Cache_Interface $cache)

Parameters

CRM_Utils_Cache_Interface $cache Localization cache.

at line 53
flush()

Flush the cache of translated strings.

at line 69
array get(string $bucket, string $file, string $format)

Get the strings from a file, using a cache if available.

Parameters

string $bucket The name of a cache-row which includes strings for this file.
string $file File path.
string $format Type of file (e.g. 'text/javascript', 'text/html').

Return Value

array List of translatable strings.

at line 97
array extract(string $file, string $format)

Extract a list of strings from a file.

Parameters

string $file File path.
string $format Type of file (e.g. 'text/javascript', 'text/html').

Return Value

array List of translatable strings.

Exceptions

Exception