Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
MessagesDomain.php
Go to the documentation of this file.
1<?php
2
4
6
17 protected $messages;
18 protected $loader;
19 protected $locale;
20 protected $domain;
21
22 public function __construct($locale=null, LoaderInterface $loader=null, $domain=null) {
23 $this->locale = $locale;
24 $this->loader = $loader;
25 $this->domain = $domain;
26 }
27
32 public function getMessages() {
33 return $this->messages;
34 }
35
40 public function getLoader() {
41 return $this->loader;
42 }
43
48 public function getLocale() {
49 return $this->locale;
50 }
51
56 public function setMessages($messages) {
57 $this->messages = $messages;
58 }
59
64 public function setLoader($loader) {
65 $this->loader = $loader;
66 }
67
72 public function setLocale($locale) {
73 $this->locale = $locale;
74 }
75
76 public function store() {
77 $this->loader->save ( $this->messages, $this->locale, $this->domain );
78 }
79
80 public function load() {
81 $this->messages = $this->loader->loadDomain ( $this->locale, $this->domain );
82 }
86 public function getDomain() {
87 return $this->domain;
88 }
89
90}
91
Represents a list of messages in a domain for a locale.
__construct($locale=null, LoaderInterface $loader=null, $domain=null)