blob: 40597e3e58ef7c1a04942da42120e9a47c5d92bb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
<?php
namespace CommerceGuys\Intl\Language;
/**
* Language repository interface.
*/
interface LanguageRepositoryInterface
{
/**
* Gets a language matching the provided language code.
*
* @param string $languageCode The language code.
* @param string|null $locale The locale (i.e. fr-FR).
*
* @return Language
*
* @throws \CommerceGuys\Intl\Exception\UnknownLanguageException
*/
public function get(string $languageCode, string $locale = null): Language;
/**
* Gets all languages.
*
* @param string|null $locale The locale (i.e. fr-FR).
*
* @return Language[] An array of languages, keyed by language code.
*/
public function getAll(string $locale = null): array;
/**
* Gets a list of languages.
*
* @param string|null $locale The locale (i.e. fr-FR).
*
* @return array An array of language names, keyed by language code.
*/
public function getList(string $locale = null): array;
}
|