@@ -10,7 +10,7 @@ class DefaultBrowserLocale implements BrowserLocale
10
10
*
11
11
* @var array
12
12
*/
13
- private $ locales = [];
13
+ protected $ locales = [];
14
14
15
15
/**
16
16
* Create a new DefaultBrowserLocale instance.
@@ -67,7 +67,7 @@ public function getLocales($propertyFilter = null)
67
67
*
68
68
* @return void
69
69
*/
70
- private function parseAcceptLanguages ($ httpAcceptLanguages )
70
+ protected function parseAcceptLanguages ($ httpAcceptLanguages )
71
71
{
72
72
foreach ($ this ->splitAcceptLanguages ($ httpAcceptLanguages ) as $ httpAcceptLanguage ) {
73
73
if ($ locale = $ this ->parseAcceptLanguage ($ httpAcceptLanguage )) {
@@ -85,7 +85,7 @@ private function parseAcceptLanguages($httpAcceptLanguages)
85
85
*
86
86
* @return Locale|null
87
87
*/
88
- private function parseAcceptLanguage ($ httpAcceptLanguage )
88
+ protected function parseAcceptLanguage ($ httpAcceptLanguage )
89
89
{
90
90
$ parts = $ this ->splitAcceptLanguage ($ httpAcceptLanguage );
91
91
@@ -114,7 +114,7 @@ private function parseAcceptLanguage($httpAcceptLanguage)
114
114
*
115
115
* @return array
116
116
*/
117
- private function splitAcceptLanguages ($ httpAcceptLanguages )
117
+ protected function splitAcceptLanguages ($ httpAcceptLanguages )
118
118
{
119
119
return explode (', ' , $ httpAcceptLanguages ) ?: [];
120
120
}
@@ -128,7 +128,7 @@ private function splitAcceptLanguages($httpAcceptLanguages)
128
128
*
129
129
* @return array
130
130
*/
131
- private function splitAcceptLanguage ($ httpAcceptLanguage )
131
+ protected function splitAcceptLanguage ($ httpAcceptLanguage )
132
132
{
133
133
return explode ('; ' , trim ($ httpAcceptLanguage )) ?: [];
134
134
}
@@ -142,7 +142,7 @@ private function splitAcceptLanguage($httpAcceptLanguage)
142
142
*
143
143
* @return string
144
144
*/
145
- private function getLanguage ($ locale )
145
+ protected function getLanguage ($ locale )
146
146
{
147
147
return strtolower (substr ($ locale , 0 , 2 ));
148
148
}
@@ -156,7 +156,7 @@ private function getLanguage($locale)
156
156
*
157
157
* @return string
158
158
*/
159
- private function getCountry ($ locale )
159
+ protected function getCountry ($ locale )
160
160
{
161
161
if (($ divider = strpos ($ locale , '- ' )) === false ){
162
162
return '' ;
@@ -174,7 +174,7 @@ private function getCountry($locale)
174
174
*
175
175
* @return float
176
176
*/
177
- private function getWeight ($ q )
177
+ protected function getWeight ($ q )
178
178
{
179
179
$ weight = 1.0 ;
180
180
$ parts = explode ('= ' , $ q );
@@ -191,7 +191,7 @@ private function getWeight($q)
191
191
*
192
192
* @return void
193
193
*/
194
- private function sortLocales ()
194
+ protected function sortLocales ()
195
195
{
196
196
usort ($ this ->locales , function ($ a , $ b ) {
197
197
if ($ a ->weight === $ b ->weight ) {
@@ -210,7 +210,7 @@ private function sortLocales()
210
210
*
211
211
* @return array
212
212
*/
213
- private function filterLocaleInfo ($ property )
213
+ protected function filterLocaleInfo ($ property )
214
214
{
215
215
$ filters = ['locale ' , 'language ' , 'country ' , 'weight ' ];
216
216
$ locales = $ this ->locales ;
0 commit comments