Documentation

CRM_Core_Resources_Strings
in package

Manage translatable strings on behalf of resource files.

Tags
copyright

CiviCRM LLC https://civicrm.org/licensing

Table of Contents

Properties

$cache  : CRM_Utils_Cache_Interface|null
Cache.

Methods

__construct()  : mixed
extract()  : array<string|int, mixed>
Extract a list of strings from a file.
flush()  : mixed
Flush the cache of translated strings.
get()  : array<string|int, mixed>
Get the strings from a file, using a cache if available.

Properties

Methods

extract()

Extract a list of strings from a file.

public extract(string $file, string $format) : array<string|int, mixed>
Parameters
$file : string

File path.

$format : string

Type of file (e.g. 'text/javascript', 'text/html').

Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

List of translatable strings.

flush()

Flush the cache of translated strings.

public flush() : mixed

get()

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

public get(string $bucket, string $file, string $format) : array<string|int, mixed>
Parameters
$bucket : string

The name of a cache-row which includes strings for this file.

$file : string

File path.

$format : string

Type of file (e.g. 'text/javascript', 'text/html').

Tags
throws
CRM_Core_Exception
Return values
array<string|int, mixed>

List of translatable strings.


        
On this page

Search results