PHP Class yupe\components\urlManager\LangUrlManager

Inheritance: extends CUrlManage\CUrlManager
显示文件 Open project: yupe/yupe Class Usage Examples

Public Properties

Property Type Description
$langParam string

Protected Properties

Property Type Description
$_currentLang string
$_defaultLang string
$_langFromCookie string
$_langFromUrl string
$_languages array
$yupe YupeModule

Public Methods

Method Description
createUrl ( string $route, array $params = [], string $ampersand = '&' ) : mixed | string
getAvailableLanguages ( ) : array
getCookieKey ( ) : string
getCurrentLang ( ) : null | string
getDefaultLang ( ) : string
getLangFromCookie ( ) : null | string
getLangFromUrl ( ) : null | string
init ( )
isBackend ( ) : boolean
removeLangFromUrl ( $url ) : string
replaceLangInUrl ( $url, $lang = null ) : string

Method Details

createUrl() public method

public createUrl ( string $route, array $params = [], string $ampersand = '&' ) : mixed | string
$route string
$params array
$ampersand string
return mixed | string

getAvailableLanguages() public method

public getAvailableLanguages ( ) : array
return array

getCookieKey() public method

public getCookieKey ( ) : string
return string

getCurrentLang() public method

public getCurrentLang ( ) : null | string
return null | string

getDefaultLang() public method

public getDefaultLang ( ) : string
return string

getLangFromCookie() public method

public getLangFromCookie ( ) : null | string
return null | string

getLangFromUrl() public method

public getLangFromUrl ( ) : null | string
return null | string

init() public method

public init ( )

isBackend() public method

public isBackend ( ) : boolean
return boolean

removeLangFromUrl() public method

public removeLangFromUrl ( $url ) : string
$url
return string

replaceLangInUrl() public method

public replaceLangInUrl ( $url, $lang = null ) : string
$url
return string

Property Details

$_currentLang protected_oe property

protected string $_currentLang
return string

$_defaultLang protected_oe property

protected string $_defaultLang
return string

$_langFromCookie protected_oe property

protected string $_langFromCookie
return string

$_langFromUrl protected_oe property

protected string $_langFromUrl
return string

$_languages protected_oe property

protected array $_languages
return array

$langParam public_oe property

public string $langParam
return string

$yupe protected_oe property

protected YupeModule $yupe
return YupeModule