Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
MessagesCatalog.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\translation
;
4
5
use
Ubiquity\translation\loader\LoaderInterface
;
6
16
class
MessagesCatalog
{
17
protected
$messagesDomains
;
22
protected
$loader
;
23
protected
$locale
;
24
25
public
function
__construct
(
$locale
,
LoaderInterface
$loader
) {
26
$this->locale =
$locale
;
27
$this->loader =
$loader
;
28
$this->messagesDomains = [ ];
29
}
30
31
public
function
load
() {
32
$this->messagesDomains = [ ];
33
$domains = $this->
getDomains
();
34
foreach
( $domains as $domain ) {
35
$do =
new
MessagesDomain
( $this->locale, $this->loader, $domain );
36
$do->load ();
37
$this->messagesDomains [] = $do;
38
}
39
}
40
41
public
function
getDomains
() {
42
return
$this->loader->getDomains ( $this->locale );
43
}
44
49
public
function
getMessagesDomains
() {
50
return
$this->messagesDomains
;
51
}
52
}
53
Ubiquity\translation\MessagesCatalog
Catalog of translation messages associated to a locale.
Definition
MessagesCatalog.php:16
Ubiquity\translation\MessagesCatalog\$locale
$locale
Definition
MessagesCatalog.php:23
Ubiquity\translation\MessagesCatalog\getMessagesDomains
getMessagesDomains()
Definition
MessagesCatalog.php:49
Ubiquity\translation\MessagesCatalog\load
load()
Definition
MessagesCatalog.php:31
Ubiquity\translation\MessagesCatalog\__construct
__construct($locale, LoaderInterface $loader)
Definition
MessagesCatalog.php:25
Ubiquity\translation\MessagesCatalog\$messagesDomains
$messagesDomains
Definition
MessagesCatalog.php:17
Ubiquity\translation\MessagesCatalog\getDomains
getDomains()
Definition
MessagesCatalog.php:41
Ubiquity\translation\MessagesCatalog\$loader
$loader
Definition
MessagesCatalog.php:22
Ubiquity\translation\MessagesDomain
Represents a list of messages in a domain for a locale.
Definition
MessagesDomain.php:16
Ubiquity\translation\loader\LoaderInterface
Translations loader interface.
Definition
LoaderInterface.php:14
Ubiquity\translation
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
translation
MessagesCatalog.php
Generated on Sun Dec 10 2023 15:04:25 for
Ubiquity
by
doxygen
1.9.8