-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathILinksModel.php
More file actions
32 lines (31 loc) · 965 Bytes
/
ILinksModel.php
File metadata and controls
32 lines (31 loc) · 965 Bytes
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
<?php
interface ILinksModel
{
/**
* Constructor
* @param string $defaultLanguage
* @param string $acceptedLanguages
*/
public function __construct(string $defaultLanguage, string $acceptedLanguages);
/**
* Set the language code in url
* @param string $url url to modify
* @param string $languageCode
* @return string modified url
*/
public function setLanguageCode(string $url, string $languageCode);
/**
* Gets the language code from the url if present
* @return string language code or empty string if not found
*/
public function getLanguageCode();
/**
* Get Url that has language parameter with value in it
*/
public function getUrlFromRequest();
/**
* Get Url that has specified language value in it
* @param string $languageCode value that must be replaced in current url
*/
public function getUrlForLanguage(string $languageCode);
}