| 1 | <?php namespace Propaganistas\LaravelIntl\Base; |
||
| 5 | class Intl implements IntlInterface |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var mixed |
||
| 9 | */ |
||
| 10 | protected $data; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Get a localized entry. |
||
| 14 | * |
||
| 15 | * @param string $code |
||
| 16 | * @return mixed |
||
| 17 | */ |
||
| 18 | 57 | public function get($code) |
|
| 22 | |||
| 23 | /** |
||
| 24 | * Get a localized list of entries, keyed by their code. |
||
| 25 | * |
||
| 26 | * @return array |
||
| 27 | */ |
||
| 28 | 9 | public function all() |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Get the default locale. |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | 12 | public function getLocale() |
|
| 39 | { |
||
| 40 | 12 | return $this->data->getDefaultLocale(); |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Set the default locale. |
||
| 45 | * |
||
| 46 | * @param string $locale |
||
| 47 | * @return $this |
||
| 48 | */ |
||
| 49 | 45 | public function setLocale($locale) |
|
| 55 | |||
| 56 | /** |
||
| 57 | * Get the fallback locale. |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getFallbackLocale() |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Set the desired locale. |
||
| 68 | * |
||
| 69 | * @param string $locale |
||
| 70 | * @return $this |
||
| 71 | */ |
||
| 72 | 12 | public function setFallbackLocale($locale) |
|
| 78 | } |