aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/commerceguys/intl/src/Language/LanguageRepositoryInterface.php
blob: 12480fc1b691fa8b338b9eaa9a9cd118ed8a9dd4 (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
<?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 $locale       The locale (i.e. fr-FR).
     *
     * @return Language
     */
    public function get($languageCode, $locale = null);

    /**
     * Gets all languages.
     *
     * @param string $locale The locale (i.e. fr-FR).
     *
     * @return Language[] An array of languages, keyed by language code.
     */
    public function getAll($locale = null);

    /**
     * Gets a list of languages.
     *
     * @param string $locale The locale (i.e. fr-FR).
     *
     * @return array An array of language names, keyed by language code.
     */
    public function getList($locale = null);
}